Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Binary Search 总结帖 (更新完) #8

Closed
Assignees
Milestone
@tech-cow

Description

Binary Search

所有题目

Leetcode

Day 1

  • 852 Peak Index in a Mountain Array
  • 349 Intersection of Two Arrays
  • 167 Two Sum II - Input array is sorted
  • 350 Intersection of Two Arrays II
  • 744 Find Smallest Letter Greater Than Target

Day 2

  • 35 Search Insert Position
  • 278 First Bad Version
  • 367 Valid Perfect Square
  • 374 Guess Number Higher or Lower
  • 441 Arranging Coins
  • 69. Sqrt(x)

Day 3 - 6

  • 658. Find K Closest Elements
  • 162. Find Peak Element
  • 153. Find Minimum in Rotated Sorted Array
  • 74. Search a 2D Matrix
  • 34. Search for a Range
  • 240. Search a 2D Matrix II
  • 33. Search in Rotated Sorted Array
  • 81. Search in Rotated Sorted Array II

Lintcode

Day 3 - 5

  • 458. Last Position of Target
  • 585. Maximum Number in Mountain Sequence
  • 447. Search in a Big Sorted Array
  • 462. Total Occurrence of Target
  • 459. Closest Number in Sorted Array

题目的分类总结:

刷题先后顺序:

  • 有明确Target的Easy, Medium
  • 没有明确Target的Easy,Medium
    • 纳尼,你说你弄不懂到底返回left还是right,不慌,送你边界处理神器
    • 该神器的使用方法:把代码拷过去,然后initiatize一个object,随便传入一个Test Case,然后点运行。代码会一步一步的跑,你就可以看你leftright在每一层迭代之后的值了。
  • 没有明确Target的Easy,Medium (边界变种)

不用谢啦

Metadata

Metadata

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /