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? Please check out my github and my Java coding book.

 

combinations of operators and parentheses

Combinations of adding operators and parentheses

Combinations of adding operators and parentheses is to add operators such as +, -, *, / and parentheses () to ...
Read More
find least common set

Find Least common set with union find – code

When we have number of sets, and need to group them into joint and disjoint-sets, union–find is the algorithm to ...
Read More
spell autocorrector

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 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
detect graph cycle

Detect cycle in 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
huffman coding

Huffman coding and compression – Code

Huffman coding generates the prefix codes based on the frequencies of corresponding characters, and then compresses the data from the ...
Read More
K closest points

Find K closest points to origin (3 solutions) – code

The K closest problem is to find K closest points to the pointer(0,0) (it is called center or origin). The ...
Read More
find all subset string

Find all subset of string in dictionary – code

Find all subset of string in dictionary is to find the subset of an input string that exists in dictionary ...
Read More
Build status hierarchy object java

Convert hierarchy to nested objects – code

There are online tools that convert JSON file to objects. The same idea applies to "convert hierarchy to nested objects" ...
Read More

 

Comments are closed