Interview algorithms
Introduction
1.
Array
1.1.
Dutch National Flag
1.2.
PlusOne
1.3.
Big Number Multiplication
1.4.
Advancing Through An Array
1.5.
Remove Element From Array
1.6.
Best Time to Buy and Sell Stock
1.7.
Shortest Word Distance
1.8.
Union and Intersect of two sorted array
1.9.
Can plant flowers
1.10.
Two Sum II
1.11.
Find duplicates
1.12.
Rotate an array
2.
Subarray
2.1.
Maximum Subarray
2.2.
Maximum Product Subarray
2.3.
Find the longest subarray whose sum <= k
2.4.
Compute the longest contiguous increasing subarray
2.5.
Find subarray with given sum
2.6.
Product of Array Except Self
3.
Multidimensional Arrays
4.
LinkedList
4.1.
Merge two sorted list
4.2.
Merge K sorted list
4.3.
Flattern doubly linked list
5.
Tree
5.1.
Serialize and Deserialize a Binary Tree
5.2.
Binary Tree Level Order Traversal
5.3.
Binary Tree Zigzag Level Order Traversal
5.4.
Lowest Common Ancestor of a Binary Tree
5.5.
Is same tree
5.6.
Binary Tree Upside Down
5.7.
Mirror Tree
5.8.
Convert BST to doubly-linked ;ist
5.9.
Convert a given Binary Tree to Doubly Linked List
6.
Number
6.1.
Compute x * y without arithmetical operator
6.2.
Compute x / y (Divide)
6.3.
Compute x^y (power)
6.4.
Basic Calculator
6.5.
Prime Number
6.6.
Count the number of possible triangles
6.7.
Reverse Integer
6.8.
Median in a stream of integers
7.
String
7.1.
Valid Number
7.2.
Int To String && String to int
7.3.
Text Justification
7.4.
Longest Substring with At Most Two Distinct Characters
7.5.
Minimum Window Substring
7.6.
Crypt analysis
7.7.
Read N Characters Given Read4
7.8.
Valid Palindrome
8.
Search
8.1.
Find Kth smallest element in an array
9.
Binary Search
9.1.
First Bad Version
9.2.
Search a 2D Matrix II
9.3.
Median of Two Sorted Arrays
9.4.
Search in Rotated Sorted Array
9.5.
Count the number of occurrences in a sorted array
9.6.
Sqrt(x)
9.7.
Search for a Range
9.8.
Search minimum/maximum in a rotated sorted array
10.
Graph
10.1.
Clone Graph
10.2.
Undirected Graph
10.3.
Weighted Digraph
11.
BackTracking
11.1.
Factor Combinations
11.2.
Permutation
11.3.
Subset
11.4.
N-Queens
11.5.
Sudoku Solver
11.6.
Combination Sum
12.
Dynamic Programming
12.1.
House Robber
12.2.
Distinct Subsequences
12.3.
Word Break
12.4.
Paint House
12.5.
Decode ways
12.6.
Maximum size square sub-matrix with all 1s
12.7.
Longest Increasing Subsequence
12.8.
Longest Arithmetic Progression
13.
Greedy Algorithm
14.
Sort
14.1.
Merge Sort
14.2.
Merge Intervals
14.3.
Insert interval
14.4.
Linkedin Intervals
14.5.
Points On A Plane
15.
HashTable
15.1.
Isomorphic Strings
15.2.
Two Sum (Design Data structure)
15.3.
Shortest Word Distance II
16.
Divide and Conquer
17.
BFS
17.1.
Word Ladder
18.
Data Structure
18.1.
Stack: Evaluate Reverse Polish Notation
19.
Design DataStructure
19.1.
Middle Stack
19.2.
Min Stack
19.3.
Max Stack
19.4.
LRU Cache
19.5.
Blocking Queue
19.6.
Merge k sorted iterators
19.7.
Two Sum III - Data structure design
19.8.
Text File Iterable
20.
Bit Manipulation
20.1.
Repeated DNA Sequences
21.
Matrix
21.1.
Rotate Image
21.2.
Number of islands
21.3.
Maximum islands
22.
Recursion
22.1.
Nested Integer
23.
Heap
23.1.
Merge K sorted List
23.2.
Kth Largest Element in an Array
23.3.
The Most Efficient Way To Find Top K Frequent Words
Powered by
GitBook
Interview algorithms
HashTable