## Count number of ways to arrange first N numbers

Count number of ways to arrange the first N natural numbers in a line such that the left-most number is always 1 and no two… Read More »

- Optimal Strategy for a Game | Set 2
- Bellman Ford Algorithm (Simple Implementation)
- Maximum Sum Subsequence of length k
- Coin Change | BFS Approach
- Maximum sum such that no two elements are adjacent | Set 2
- Minimum time required to rot all oranges | Dynamic Programming
- Partition an array of non-negative integers into two subsets such that average of both the subsets is equal
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Number of subsets with zero sum
- Maximum sum combination from two arrays
- Greedy approach vs Dynamic programming
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Minimum number of cubes whose sum equals to given number N
- Iterative approach to print all permutations of an Array
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Maximize the happiness of the groups on the Trip
- Maximum sum path in a matrix from top to bottom and back
- Divide the array in K segments such that the sum of minimums is maximized
- Minimum number of Fibonacci jumps to reach end
- Number of ways to choose elements from the array such that their average is K
- Number of shortest paths to reach every cell from bottom-left cell in the grid
- Mobile Numeric Keypad Problem | Set 2
- Subset with sum closest to zero
- Find minimum steps required to reach the end of a matrix | Set - 1
- Minimum number of sub-strings of a string such that all are power of 5
- 0-1 knapsack queries
- Maximum sum of non-overlapping subarrays of length atmost K
- Total number of odd length palindrome sub-sequence around each centre
- Number of ways to divide an array into K equal sum sub-arrays
- Optimally accommodate 0s and 1s from a Binary String into K buckets

Count number of ways to arrange the first N natural numbers in a line such that the left-most number is always 1 and no two… Read More »

Given an array arr[] of N integers, the task is to sort the array in non-decreasing order by performing the minimum number of operations. In… Read More »

Given an array arr[] of N integers, the task is to find and print the Longest Increasing Subsequence. Examples: Input: arr[] = {12, 34, 1,… Read More »

Given N lecture timings, with their start time and end time (both inclusive), the task is to find the minimum number of halls required to… Read More »

Given an array arr[] and an integer K, the task is to partition the array into K non-empty groups where each group is a subarray… Read More »

Given a binary matrix of size N * M, the task is to find the largest area sub-matrix such that all elements in it are… Read More »

An ordered set of integers is said to be a special set if for every element of the set X, the set does not contain… Read More »

Given two integers N and M and the task is to convert N to M with the following operations: Multiply N by 2 i.e. N… Read More »

Given two integers N and K, the task is to find the count of all the integer in base K which satisfy the following conditions:… Read More »

Given an array arr[] and an integer K. The task is to divide the array into K parts ( subarray ) such that the sum… Read More »

Given an integer N. The task is to find the number in the range from 1 to N-1 which is having the maximum number of… Read More »

Given an array arr[] of N integers, the task is to find the count of all the subsets which do not contain adjacent elements from… Read More »

Given a positive integer N, the task is to count the total number of set bits in binary representation of all the numbers from 1… Read More »

Given a matrix of integers mat[][] of size N * M. The task is to find the maximum perimeter of a square in the matrix.… Read More »

Consider a row of n coins of values v1 . . . vn, where n is even. We play a game against an opponent by… Read More »