##
Number of decisions to reach destination
March 19, 2017

Given a grid which consists of 4 types of characters : ‘B’ ‘.’ ‘S’ and ‘D’. We need to reach D starting from S, at… Read More »

March 19, 2017

Given a grid which consists of 4 types of characters : ‘B’ ‘.’ ‘S’ and ‘D’. We need to reach D starting from S, at… Read More »

March 18, 2017

Given an undirected tree whose each node is associated with a weight. We need to delete an edge in such a way that difference between… Read More »

March 12, 2017

Consider a matrix with rows and columns, where each cell contains either a ‘0’ or a ‘1’ and any cell containing a 1 is called… Read More »

February 25, 2017

Problem Statement : Given a graph which represents a flow network where every edge has a capacity. Also given two vertices source ‘s’ and sink… Read More »

February 3, 2017

Given a tree of n even nodes. The task is to find the maximum number of edges to be removed from the given tree to… Read More »

December 7, 2016

Given an array of strings, find if the given strings can be chained to form a circle.

October 17, 2016

We are given a map of cities connected with each other via cable lines such that there is no cycle between any two cities. We… Read More »

September 8, 2016

Given two integers ‘n’ and ‘m’, find all the stepping numbers in range [n, m]. A number is called stepping number if all adjacent digits… Read More »

July 23, 2016

We have discussed flattening of a multi-level linked list where nodes have two pointers down and next. In the previous post, we flattened the linked… Read More »

May 19, 2016

There are two common ways to traverse a graph, BFS and DFS. Considering a Tree (or Graph) of huge height and width, both BFS and… 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 »