Problem Statement: Given a DAG( Directed Acyclic Graph ), print all the vertex of the graph in a topologically sorted
Continue readingCheck if given year is a leap year or not
In this post we will solve the problem “Check if given year is a leap year or not”. Problem Statement:
Continue readingAverage of all the elements in the array
Problem Statement: Given an array, we have to find the average of all the elements in the array. Examples: Example
Continue readingCheck for Children Sum Property in a Binary Tree
Problem Statement: Children Sum Property in a Binary Tree. Write a program that converts any binary tree to one that follows
Continue readingFlatten Binary Tree to Linked List
Problem Statement: Flatten Binary Tree To Linked List. Write a program that flattens a given binary tree to a linked list.
Continue readingDijkstra’s Algorithm – Shortest distance
Problem Statement: Given a weighted, undirected, and connected graph of V vertices and E edges, Find the shortest distance of all
Continue readingBellman-Ford Algorithm – Shortest Distance with Negative Edge
Problem Statement: Given a weighted directed graph with negative edge weights with n nodes and m edges. Nodes are labeled from
Continue readingMinimum Spanning Tree – MST using Prim’s Algo
Problem Statement: Given a weighted, undirected, and connected graph of V vertices and E edges. The task is to find the
Continue readingMinimum Spanning Tree – MST using Kruskal’s Algo
Problem Statement: Given a weighted, undirected, and connected graph of V vertices and E edges. The task is to find
Continue readingBipartite Check using DFS – If Graph is Bipartite
Problem Statement: Given is a 2D adjacency list representation of a graph. Check whether the graph is Bipartite graph. (Note:
Continue reading