摘要:
来自http://zh.cppreference.com/w/cpp/iterator 迭代器库提供了5种迭代器的定义,同时还提供了迭代器特征、适配器及其相关的工具函数。 迭代器共有5种:InputIterator,OutIterator,ForwardInterator,Bidirectional 阅读全文
摘要:
Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
摘要:
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文
摘要:
多写限制条件可以加快调试速度。 Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How an 阅读全文
摘要:
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. 阅读全文
摘要:
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a functio 阅读全文
摘要:
uppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target val 阅读全文