Understanding of DFS and BFS and definition of coordinates

Source: Internet
Author: User

1:
Coordinate type search: This type of search question is usually simple, complicated, and usually complicated in terms of boundary processing and discussion. To analyze such problems, we must first Grasp the meaning of the question and see how to build a coordinate system (especially important ),
Then carefully analyze the searchedHow can each stage be transferred to the next stage through conditions. Determine each recursive (for DFS)Backtracing and in-depth conditions. For BFs, pay attentionPay attention to the heavy score when entering the team each time. Be sure
The status of the target and the time when the search is completed. And,How to set parameters in the DFS process, whether it is a parameter or not, if it is a parameter, make sure that each parameter can completely represent a State and will not appear
A State corresponds to multiple parameters, which is simpler for BFs. You only need to set more variables.
2:

Numeric search: (although I don't know how to call it, just name it). This type of search requires careful analysis and analysis. Generally, DFS is used, in addition, its termination conditions are generally obvious, and it is difficult to grasp the process, the process is similar to
search by coordinate type (weight, depth, and enumeration ), note that this type of search usually requires pruning optimization. For special statuses that obviously do not meet the requirements, we must remove them before, otherwise, it will roll like a snowball.
the larger the page is, it will waste our time.
coordinate Definition 1: clockwise
2: With left given priority to right given priority to the initial definition of coordinates eg: http://blog.csdn.net/lyy289065406/article/details/6647668
3: questions to be further explored

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.