##
Find a Mother Vertex in a Graph
March 28, 2016

What is a Mother Vertex? A mother vertex in a graph G = (V,E) is a vertex v such that all other vertices in G… Read More »

March 28, 2016

What is a Mother Vertex? A mother vertex in a graph G = (V,E) is a vertex v such that all other vertices in G… Read More »

March 12, 2016

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least… Read More »

February 22, 2016

What are BFS and DFS for Binary Tree? A Tree is typically traversed in two ways: Breadth First Traversal (Or Level Order Traversal) Depth First… Read More »

December 16, 2015

In this post “Important top 10 algorithms and data structures for competitive coding “. Topics : Graph algorithms Dynamic programming Searching and Sorting: Number theory… Read More »

December 9, 2015

In this post “Top 10 coding problems of important topics with their solutions ” are written. If you are preparing for a coding interview, going through… Read More »

October 23, 2015

Depth First Traversal (or Search) for a graph is similar to Depth First Traversal (DFS) of a tree. The only catch here is, unlike trees,… Read More »

October 16, 2015

A number is called as a Jumping Number if all adjacent digits in it differ by 1. The difference between ‘9’ and ‘0’ is not… Read More »

August 24, 2015

Given a list of contacts containing username, email and phone number in any order. Identify the same contacts (i.e., same person having many different contacts)… Read More »

June 12, 2015

Given an undirected graph, print all connected components line by line. For example consider the following graph.

April 12, 2015

Given a list of word lists How to print all sentences possible taking one word from a list at a time via recursion?

January 15, 2015

Given a directed graph, a source vertex ‘s’ and a destination vertex ‘d’, print all paths from given ‘s’ to ‘d’.

January 2, 2015

Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible… Read More »

October 20, 2014

Write a function that returns true if a given undirected graph is tree and false otherwise. For example, the following graph is a tree.

October 11, 2013

Given an undirected graph, how to check if there is a cycle in the graph? For example, the following graph has a cycle 1-0-2-1.

June 2, 2013

Given a directed graph, find out whether the graph is strongly connected or not. A directed graph is strongly connected if