摘要:
LRU Cache 这题调了好几天才pass 要点:用doubly linked list, deleteNode和addNode分开考虑,分开考虑,分开考虑,重要的事情说三遍 需要dummy node和tail,deleteNode考虑tail,addNode考虑dummy.next(因为addN 阅读全文
摘要:
Find Minimum in Rotated Sorted Array II, Search in Rotated Sorted Array II: 注意这两题都是对nums[mid]和nums[low]进行if...elif...else分支而不是nums[low]和nums[high],这几题 阅读全文
摘要:
Find Minimum in Rotated Sorted Array 要点:low=nums[low]: low = mid+1 else: high = mid return nums[mid] ``` 阅读全文