Source Code

Source code are the collections of coding interview questions and their source code. Click the title you are interested, you will find the download link of the source code. Cannot find what you want? There are more in my github. Also you can check out the complete list of coding interview questions in my pocket book.



Spell autocorrect with edit distance – Code

Google provides a powerful spell correct for validating the keywords we type into the input text box. It checks against ...
Read More
DFS and adjacent matrix

Depth first search and adjacent matrix – Code

Depth first search (DFS) is an algorithm to traverse each element in the data structure. It starts from the source ...
Read More
royal succession order

Monarchy succession order – code

Monarchy succession order is also known as The line of succession to the British throne. The succession to the British ...
Read More

Remove cycle in directed graph and convert graph to tree – code

A graph is a data structure that consists of a set of vertices (aka nodes) connected by edges. A graph ...
Read More
Build hierarchy tree java

Build hierarchy tree – Code

Build hierarchy tree reads employee data and build a corporation hierarchy tree from the list. HashMap plays important role to ...
Read More
shortest path using Dijkstra java

Shortest path and 2nd shortest path using Dijkstra – code

What is Dijkstra's algorithm? Dijkstra's algorithm is an algorithm to find the shortest paths between vertices in a graph. It ...
Read More
Autocomplete with trie java

Autocomplete with trie – Code

Autocomplete is a feature that search box returns the suggestions based on what you have typed. Autocomplete with trie provides ...
Read More
word break java

Word break using memoization – Code

What is word break? Word break is to divide a string into sub-strings that defined in dictionary. The problem is ...
Read More
Huffman coding and compression

Huffman coding and compression – Code

What is Huffman code? Huffman code is a particular type of optimal prefix code. It is commonly used for lossless ...
Read More
convert prefix to postfix java

Prefix to postfix (2 solutions) – Code

In mathematics expressions, there are infix, prefix and postfix notations. Infix notation is characterized by the placement of operators between ...
Read More


Comments are closed