The following are the common subjects in coding interviews.
As understanding those concepts requires much more effort, this tutorial only serves as an introduction.
The subjects that are covered include:
- String/Array/Matrix
- Linked List
- Tree
- Heap
- Graph
- Sorting
- Dynamic Programming
- Bit Manipulation
- Combinations and Permutations
- Math Problems
-
An algorithm problem contains 3 parts: the input, the output and the solution.
-
The input data structures can be an array, string, tree, liked list, matrix, etc.
-
The algorithm used to solve the problem can be dynamic programming, BFS and DFS.
-
It can also be a data structure, such as a heap, stack, hash set, hash map, etc.
-
The algorithm problems are classified by their input data structure.
-
Under each categories, the problems are tagged with their algorithm or data structure used to solve the problem.
-
Array/String
- Two Pointers
- Two Sum, Two Sum II, Two Sum III, 3Sum, 4Sum, 3Sum Closest
- Classic array problem
- Finding a Number
- Binary Search
- Stack
- Largest Rectangle
- Nested Object
- HashMap
- Tracking
- HashSet
- Caching
- Rotate
- Bucket Sort
- DFS
- BFS
- Heap
- TreeSet
- Track min/max and update result
- Stream (deque/caching/heap/treeset)
- Sorting
- Interval
- Implement data structure
- Trie
- Segment Tree & Binary Index Tree
- Graph (mainly topological sort)
- Ugly Number
- Maximum subarray
- Word break
- DP
- 2D
- Design data structure with time requirements
- Other dbf/bfs
- Random
- Other
- Two Pointers
-
Matrix
- sorted matrix
- queue
- bfs/dfs
-
Linked List
-
Tree
- traveral
- dfs/bfs
-
Bit Manipulation
-
Math
- power
- /%
- These questions are solved using Python 3 and Google Go with unit test.
https://www.programcreek.com/2013/08/leetcode-problem-classification/
https://www.programcreek.com/2012/11/top-10-algorithms-for-coding-interview/