The coding interview is hard because We have to remember the basic data structures and algorithms. For me, I received masters degree of computer science seven years ago. Most of the tech companies require the coding interview when you apply for a job. So I decided to summarize the data structure and algorithm.
Here is the list, and I’ll write the basic concept and will be solving problems using Swift
Complexity
-
Time Complexity
-
Space Complexity
Data Structures
-
Stack
-
Queue
-
Circular Queue
-
Linked List
-
Doubly Linked List
-
Reverse Linked List
-
-
Hash Table
-
Tree
-
Binary Tree
-
BFS
-
DFS
-
Pre-Order
-
In-Order
-
Post-Order
-
-
-
Binary Search Tree [Ordered Binary Tree]
-
-
Dictionary
-
Set
-
Graph
-
Directed
-
Undirected
-
Graph using an Adjacency Matrix
-
Graph using an Adjacency List and Set
-
Depth First
-
Breath First
-
Topological Sort
-
Weighted Graph
-
Negative Weighted Graph
-
Algorithms
-
Stack
-
Match parenthesis in an expression
-
find the minimum element in a expression
-
stack in constant time
-
-
Sorting
-
Selection Sort
-
Insertion Sort
-
Bubble Sort
-
Shell Sort
-
Merge Sort
-
Quick Sort
-
-
Search
-
Linear Search [Brute Force]
-
Binary Search [Sorted List]
-
-
Binary Tree
-
Find the minimum value in a Binary Search Tree
-
Find the maximum depth of a Binary Tree
-
Mirror a Binary Tree
-
Count the number of structurally unique binary tree possible
-
print all nodes within a range in a binary search tree
-
check if a binary tree is a binary search tree
-
check if a path from toot to leaf node sums up to a certain value
-
print all paths from the root to the leaf nodes
-
find the least common ancestor for 2 nodes
-
-
Heap [Priority Queue]
-
The Binary Heap
-
Minimum Heap
-
Maximum Heap
-
Balanced Binary Search Tree
-
An array or A list
-
Insert and remove from a Heap
-
Heapify
-
Heap Sort
-
Merge K sorted lists into one sorted array
-
maximum element in a minimum heap and K largest elements in a stream
-
Find the median In a stream of elements
-
-
-
Graph
-
Shortest path algorithm
-
Shortest path in a weighted graph
-
Dijkstra’s Algorithm [Greedy Algorithm]
-
Bellman Ford Algorithm [Shortest path in negative weighted graph] [Greedy Algorithm]
-
Dealing with negative cycles in the weighted graph [Bellman Ford Algorithm]
-
Prim’s Algorithm for a Minimal Spanning Tree [Undirected Graph] [Greedy Algorithm]
-
Kruskal’s Algorithm for a Minimal Spanning Tree for Forest [Priority Queue] [Connected / Unconnected]
-
Find the shortest path In a weight graph
-
Design A course schedule considering pre request for courses
-
General Programming Problem
-
Basic Operation
-
Bit Manipulation
-
Set and Get n-th Bit
-
Print bits in Integer
-
Count the number of 1 bits
-
Reverse the bits in an Integer
-
-
Recursion
-
Find All subsets of A given set
-
Check whether 2 binary tree are the same
-
Paint Fill
-
Build A car given tasks and dependencies
-
Find all anagrams of a given word
-
Find a path a rat can travel through a maze
-
place 8 queens on a chess board
-
-
Palindrome
-
Find Distance
-
Run Length Encoding and Decoding
-
Game of Life
-
Break A Document Into Chunks
-
Add Two Numbers Represented by their Digits
-
Sudoku Validator
-
Incrementing A Number