Skip to content

Category Archives: Dynamic Programming

Given two strings text and pattern of length M and N respectively, The task is to check if the pattern matches the text or not.… Read More
Given two positive integers N and S, the task is to count the number of unique outcomes possible when S flip operations are performed on… Read More
Given a binary matrix mat[][] that represents the adjacency matrix representation of a graph, where mat[i][j] as 1 represents that there is an edge between… Read More
Given a string S, the task is to find the length of the longest increasing subsequence present in the given string. A sequence of characters… Read More
Given an array arr[] consisting of N positive integers and a positive integer K, the task is to find the minimum difference between the sum… Read More
Given an array arr[] consisting of N integers, the task is to find the size of the set S such that Bitwise XOR of any… Read More
Given an integer N, the task is to paint a grid of size N x 3 using colors Red, Yellow, or Green while making such… Read More
Given two strings str and X of length N and M respectively, the task is to find the minimum characters required to be removed from… Read More
Given four integers A, B, C and N, where A, B, C represents the first three numbers of the geekonacci series, the task is to… Read More
Given an integer N, representing the number of stations lying between the source and the destination. There are three trains available from every station and… Read More
Given an array arr[] consisting of N positive integers and a positive integer K, the task is to maximize the GCD of the array arr[]… Read More
Given a matrix mat[][] of dimensions N * M, and an integer K, the task is to find the maximum sum of any rectangle possible… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to print the maximum sum possible in a subsequence satisfying… Read More

Start Your Coding Journey Now!