摘要:
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read off 阅读全文
摘要:
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
摘要:
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 1 2 brute force 3 hash 有 阅读全文
摘要:
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
摘要:
24. Swap Nodes in Pairs 24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, 阅读全文