## Print negative weight cycle in a Directed Graph

Given a weighted directed graph consisting of V vertices and E edges. The task is to print the cyclic path whose sum of weight is… Read More »

- Median of sliding window in an array
- Eggs dropping puzzle | Set 2
- Maximum sum path in a Matrix
- Split the given string into Primes : Digit DP
- Count of subarrays of an Array having all unique digits
- Count of subarrays having exactly K perfect square numbers
- Sum of GCD of all possible sequences
- Longest alternating subsequence in terms of positive and negative integers
- Find the numbers from 1 to N that contains exactly k non-zero digits
- Minimum salary hike for each employee such that no employee feels unfair
- Count number of increasing sub-sequences : O(NlogN)
- Word Break Problem | DP-32 | Set - 2
- Number of ways to write N as a sum of K non-negative integers
- 0/1 Knapsack Problem to print all possible solutions
- Find distance between two nodes in the given Binary tree for Q queries
- Maximum length of Strictly Increasing Sub-array after removing at most one element
- Minimum increment or decrement required to sort the array | Top-down Approach
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum
- Longest common subarray in the given two arrays
- Extended Knapsack Problem
- Maximum of all distances to the nearest 1 cell from any 0 cell in a Binary matrix
- Count number of binary strings without consecutive 1’s : Set 2
- Maximum path sum in the given arrays with at most K jumps
- Find the count of mountains in a given Matrix
- Minimum window size containing atleast P primes in every window of given range
- Maximum size of square such that all submatrices of that size have sum less than K
- Count ways to partition a string such that both parts have equal distinct characters
- Count the number of ways to divide N in k groups incrementally
- Ackermann's function using Dynamic programming
- Find if there is a path between two vertices in an undirected graph

Given a weighted directed graph consisting of V vertices and E edges. The task is to print the cyclic path whose sum of weight is… Read More »

Given an array arr[] of size N, the task is to find the number of non-empty subsequences from the given array such that no two… Read More »

Given a matrix of size N x M and an integer X, the task is to find the number of sub-squares in the matrix with… Read More »

Given two integers N and K, the task is to find the count of N-digit numbers such that the absolute difference of adjacent digits in… Read More »

Given a Directed Graph and two vertices in it, check whether there is a path from the first given vertex to second. Example: Consider the… Read More »

Given an integer array arr of size N. The task is to find the maximum number of splits such that each split has sum divisible… Read More »

Given a rod of length N meters, and the rod can be cut in only 3 sizes A, B and C. The task is to… Read More »

Given an undirected graph having N vertices and M edges and each vertex is associated with a cost and a source vertex S is given.… Read More »

Given two integers N and K, the task is to count the numbers up to N digits such that no two zeros are adjacents and… Read More »

Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal… Read More »

Given an array arr[] of N integers, and a range L to R, the task is to find the total number of elements in the… Read More »

Given a string S of size N, the task is to count the occurrences of all the prefixes of the given string S. Examples: Input:… Read More »

Given an array arr[] consisting of N integers and an integer K, the task is to find the length of longest subsequence with sum equal… Read More »

Given an integer Q representing the number of queries and an array where each query has an integer N. Our task is to iterate through… Read More »

Given a graph and two nodes u and v, the task is to print the shortest path between u and v using the Floyd Warshall… Read More »