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.


longest path matched cards

Longest path of matched cards – code

Longest path of matched cards is to link the cards that have the matched suite or figure. This is an ...
Read More
suggested friends

Get suggested friends (2 solutions) – code

When you are asked to design the data structures for social network, normally the answer is graph. In the graph, ...
Read More
Tournament ranking with topo sort

Find ranking with topological sorting (2 solutions)

Find ranking with topological sorting is to find winner and ranking in tournament. Topological sort is a graph traversal in ...
Read More
people know story by timestamp

People who know story by time stamp -code

People who know story by time stamp is to simulate social network using graph data structure. The individual person is ...
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
wordbreak with memoization

Word break using memoization – Code

Word break is to divide a string into sub-strings that defined in dictionary. The problem is usually solved with recursion ...
Read More
shortest path in matrix

Shortest path from source to destination in matrix – Code

Shortest path in matrix is to find the shortest distance from the the source to the destination. As you know, ...
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
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
web scrape

Web scrape and parsing in Java (5 Ways)

Internet is the great resource to get information, for study, business or hobby. There are many ways of information retrieval ...
Read More


Comments are closed