Problem Statement: Given a boolean 2D matrix grid of size N x M. You have to find the number of

Continue reading# Category: Data Structure

## Number of Longest Increasing Subsequences | (DP-47)

Problem Statement: Number of Longest Increasing Subsequences Prerequisite: Longest increasing subsequence, Printing Longest Increasing subsequence Problem Link: Given an array,

Continue reading## Longest Bitonic Subsequence | (DP-46)

Problem Statement: Longest Bitonic Subsequence Prerequisite: Longest increasing subsequence, Printing Longest Increasing subsequence Problem Link: Given an array, ‘Arr’ of

Continue reading## Minimum Window substring

Problem Statement: Given two strings s and t of lengths m and n respectively, return the minimum window substring of

Continue reading## Palindromic substrings

Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the

Continue reading## Detect Cycle in an Undirected Graph (using DFS)

Problem Statement: Given an undirected graph with V vertices and E edges, check whether it contains any cycle or not.

Continue reading## Detect Cycle in an Undirected Graph (using BFS)

Problem Statement: Given an undirected graph with V vertices and E edges, check whether it contains any cycle or not.

Continue reading## Rotten Oranges

Problem Statement: Given a grid of dimension N x M where each cell in the grid can have values 0,

Continue reading## Word Search II

Problem statement: Given an m*n “board” of characters and a list of strings “words”, return all the words present on

Continue reading## Number of Provinces

Problem Statement: Given an undirected graph with V vertices. We say two vertices u and v belong to a single

Continue reading