Graphs

17 problems to practice.

17 Total
17 Easy
0 Medium
0 Hard

Knights Tour

1. You are given a number n, the size of a chess board. 2. You are given a row and a column, as a s...

easy

Has Path?

1. You are given a graph, a src vertex and a destination vertex. 2. You are required to find if a p...

easy

Print All Paths

1. You are given a graph, a source vertex and a destination vertex. 2. You are required to find and...

easy

Multisolver - Smallest, Longest, Ceil, Floor, Kthlargest Path

1. You are given a graph, a src vertex and a destination vertex. 2. You are give a number named "cr...

easy

Get Connected Components Of A Graph

1. You are given a graph. 2. You are required to find and print all connected components of the gra...

easy

Is Graph Connected

1. You are given a graph. 2. You are required to find and print if the graph is connected (there is...

easy

Number Of Islands

1. You are given a 2d array where 0's represent land and 1's represent water. Assume every ce...

easy

Perfect Friends

1. You are given a number n (representing the number of students). Each student will have an id...

easy

Hamiltonian Path And Cycle

1. You are given a graph and a src vertex. 2. You are required to find and print all hamiltonian pa...

easy

Is Graph Cyclic

1. You are given a graph. 2. You are required to find and print if the graph is cyclic.

easy

Is Graph Bipartite

1. You are given a graph. 2. You are required to find and print if the graph is bipartite Note -...

easy

Breadth First Traversal

1. You are given a graph, and a src vertex. 2. You are required to do a breadth first traversal and...

easy

Spread Of Infection

1. You are given a graph, representing people and their connectivity. 2. You are also given a src p...

easy

Shortest Path In Weights

1. You are given a graph and a source vertex. The vertices represent cities and the edges represent...

easy

Minimum Wire Required To Connect All Pcs

1. You are given a graph and a source vertex. The vertices represent computers and the edges...

easy

Order Of Compilation

1. You are given a directed acyclic graph. The vertices represent tasks and edges represent de...

easy

Iterative Depth First Traversal

1. You are given a graph, and a source vertex. 2. You are required to do a iterative depth first tr...

easy