Summary: The two-part topic summary and the two-way template

Source: Internet
Author: User

Two-part template:
1         while (L < r-1) {2             int m = l + (r-l)/2, 3              4             //means that there is no rotate. 5             . . The various exit conditions are added here, such as finding the target value etc 8              9             //left side is sorted.10             if (a[m] > a[l]) {one                 L = m;12             } else {                 r =      
Related dichotomy topic Links:leetcode New topic: Find Minimum in rotated Sorted Array problem Solving report-two-way template solutionleetcode New topic: Find Minimum in rotated Sorted Array II solution ...Leetcode:search in rotated Sorted Array II Problem Solving report-Blog ParkLeetcode:search in rotated Sorted Array problem Solving report-Yu ' s ...leetcode:search Insert Position Problem Solving report-Yu ' s garden ...Leetcode:search A 2D Matrix problem solving report-Yu ' s Garden-blog Park

Summary: The two-part topic summary and the two-way template

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.