Problem Statement: Given an array of size N. Find the highest and lowest frequency element. Pre-requisite: Hashing Theory and Counting
Continue readingCategory: 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 readingDetect 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 readingMatrix 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 readingNumber of Distinct Islands
Problem Statement: Given a boolean 2D matrix grid of size N x M. You have to find the number of
Continue readingNumber 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 readingLongest 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 readingProduct 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 readingDetect 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 readingDetect 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