Fib
strstr
Reverse a linkedlist/integer/string
Matrix
-rotate matrix/rectangle
-move a matrix
-spiral matrix I II
Anagrams(find all unique/all non-unique) Hashtable
Two Pointers:
- 2/3/4 sums, 3 sum closet, combination sum
-Sort colors
-Remove duplicates from Array
-Remove duplicates from Sorted Array
-Remove duplicates from Linked List
Recursion:
-N-Queens I, II
-Generate Parentheses
Bit-Operation
-Single Number
-Single Number II
-O(1) check whether a number is power of 2
Big Date Google
-Add binary
-Add two numbers
-Multiply strings
-Plus one
边界条件 Linkedin 沟通
Pow(x,n)
Sqrt(x)
Valid Number
Data Structure Java source code
HashMap/HashSet/Hashtable/LinkedHashMap, ArrayList, Comparator, Iterator
-Implement HashMap
-Implement peek() function for iterator
-LRU cache, implement LinkedHashMap
-Singleton
Stack & Queue
-Evaulate reverse polish notation
-Vlaid Parentheses
-Longest vaid parentheses
-Min stack
-Two stack implements a queue
Best Time to buy & sell stocks I, II, III
Maximum subarray
Trailing number of 0s
Linkedlist Cycle I, II