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

Continue reading# Category: Arrays

## 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## Product of Array Except Itself

Problem Statement: Given an array arr[] of integers, you need to return the product of given array elements except including

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## Passing 2D arrays as arguments in CPP

Ways to pass a 2D array to a function are as follows:- When both dimensions are available globally. Code: Output:

Continue reading## Counting Bits

Problem statement : Given an integer n, return an array ans whose length is n+1 such that for each i (0

Continue reading## Insert New Interval

Problem Statement: You are given an array of non-overlapping intervals where intervals[i] = [start, end] represent the start and the

Continue reading## Overlapping Intervals

Problem Statement: Given an array of intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need

Continue reading