I'm aiming to revise/ learn all the common questions asked in coding interviews. I've compiled a basic list of the concepts I need to cover, which I will then work through.
Big O Notation (time and space)
Binary Search Tree (BST)TrieBalanced (Red Black / AVL)HeapTraversal (BFS, DFS, in/pre/postorder)
Graph RepresentationsGraph traversal (BFS, DFS)Graph colouring- Dijkstra's Algorithm
- A*
- Using Java HashMap
- Uses for hashmaps
- Merge Sort
- Quick Sort
- Travelling salesman
- Rod cutting problem
- Knapsack problem
- Huffman Coding
- Kruskal's Algorithm
- Combinatorics
- Probability
- Interpreter for stack based language
LRU (Least Recently Used) cache with a max capacity, with LRU element replaced when capacity reached- Given an array of integers, determine if there are 3 elements that sum to 0. Generalise to k elements summing to i.
- Given an integer, replace its bits starting from the bit at position a to the bit at position b, inclusive, with the bits of integer k. Count from the least significant bit to the most significant bit, starting from 0. For n=24, a=1, b=6, k=17, the output should be 1058. n=100 0000 0000, k=1 0001, 1058=100 0010 0010
- Implement a simple, persistent, thread-safe cache, which should ideally be able to store up to 1 million product names
Sort the letters in one word by the order they appear in another in linear time- Given an array of values, design an algorithm that returns whether there are two duplicated within k indices of each other. Do all in O(n) running time and O(k) space
- Implement a multi-map in Java without using any collections
(EASY) Find the first recurring character in a string