Home
Gaurav's GitHub Page
Cancel

Minimal Spanning Tree

Problem Description Given a weighted, undirected and connected graph of V vertices and E edges. The task is to find the sum of weights of the edges of the Minimum Spanning Tree. geeksforgeeks So...

Dijkstra Algorithm

Problem Description Given a weighted, undirected and connected graph of V vertices and an adjacency list adj where adj[i] is a list of lists containing two integers where the first integer of each...

Number of Provinces

Problem Description Given an undirected graph with V vertices. We say two vertices u and v belong to a single province if there is a path from u to v or v to u. Your task is to find the number of ...

Graphs 101 - Part 2

Graphs 101: Part 1

Graphs 101 - Part 1

Graphs 101: Part 2

Detect Squares

This question is part of NeetCode150 series. Problem Description You are given a stream of points on the X-Y plane. Design an algorithm that: Adds new points from the stream into a data struc...

Multiply Strings

This question is part of NeetCode150 series. Problem Description Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a s...

Plus One

This question is part of NeetCode150 series. Problem Description You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The di...

Happy Number

This question is part of NeetCode150 series. Problem Description Write an algorithm to determine if a number n is happy. A happy number is a number defined by the following process: Starting...

Set Matrix Zeroes (InterviewBit)

This question is part of NeetCode150 series. Problem Description Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0’s. You must do it in place. leetcode...