## Divide N into K unique parts such that gcd of those parts is maximum

Given a positive integer N, the task is to divide it into K unique parts such that the sum of these parts is equal to… Read More »

- What is Competitive Programming and How to Prepare for It?
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Minimum increment or decrement operations required to make the array sorted
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Color all boxes in line such that every M consecutive boxes are unique
- Print nodes having maximum and minimum degrees
- Largest sub-matrix with all equal elements
- Minimize the cost of partitioning an array into K groups
- Maximum length sub-array which satisfies the given conditions
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Maximize the Expression | Bit Manipulation
- Minimum number of additons to make the string balanced
- Range maximum query using Sparse Table
- Arrow operator -> in C/C++ with Examples

Given a positive integer N, the task is to divide it into K unique parts such that the sum of these parts is equal to… Read More »

Given a N x M matrix where N is the number of rows and M is the number of columns in the given matrix and… Read More »

Given an integer N which is the number of villagers who need to cross a river but there is only one boat on which a… Read More »

Given an integer, array A. Find the sum of set bits raised to the power A[i] for each element in A[i]. Example: Input: N =… Read More »

Given two ladders of height h1 and h2. The task is to find the maximum height that can’t be reached using any possible combination by… Read More »

Given two special characters, the first character can be represented by one bit which is 0 and the second character can be represented by two… Read More »

Given an array arr[] of N distinct positive integers, let’s denote max(i, j) and secondMax(i, j) as the maximum and the second maximum element of… Read More »

Given a range [L, R], the task is to find the count of numbers from the range whose last digit is either 2, 3 or… Read More »

Are you a new developer and recently stepped into programming? You might be getting frustrated when you see that you don’t get logics in programming… Read More »

Given two binary string of unequal lengths A and B, the task is to print the binary string which is the XOR of A and… Read More »

Given a string str that consists of lower case English letters and brackets. The task is to reverse the substrings in each pair of matching… Read More »

Given an array arr[] of size N and the task is to answer Q queries of the following types: 1 X 0: Append X at… Read More »

Given an N * N grid consisting of empty cells (denoted by ‘1’) and obstacles (denoted by ‘0’), the task is to find the number… Read More »

Given a graph with N nodes and M edges where each edge has a color (either black or green) and a cost associated with it.… Read More »

Given an array of positive distinct integers arr[], the task is to find the final number obtained by performing the following operation on the elements… Read More »