Problem Statement: Given an array of size N. Find the highest and lowest frequency element. Pre-requisite: Hashing Theory and Counting

Continue reading# Category: Arrays

## Minimum cost to cut the stick| (DP-50)

Problem Description: We are given a stick of length N and a CUTS array of size C. The stick has

Continue reading## Detect cycle in a directed graph (using DFS) : G 19

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

Continue reading## Matrix Chain Multiplication | Tabulation Method | (DP-49)

In the previous article, we learned the solution for the problem of “Matrix chain multiplication”. We had discussed the recursive

Continue reading## Number of Distinct Islands

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

Continue reading## 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