## Maximum number of candies that can be bought

Given an array arr[] of size n where arr[i] is the amount of candies of type i. You have unlimited amount of money. The task… Read More »

- What is Competitive Programming and How to Prepare for It?
- Check which player visits more number of Nodes
- Make the list non-decreasing by changing only one digit of the elements
- Nth XOR Fibonacci number
- Write a function to get the intersection point of two Linked Lists | Set 2
- Number of substrings that start with "geeks" and end with "for"
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Count occurrences of a prime number in the prime factorization of every element from the given range
- Reversing a Queue using another Queue
- Minimum increment or decrement operations required to make the array sorted
- Check if the rows of a binary matrix can be made unique by removing a single column
- Number of Subarrays with positive product
- Queries for the minimum element in an array excluding the given index range
- 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
- Minimize the sum of the array according the given condition
- Count of triples (A, B, C) where A*C is greater than B*B
- Find two co-prime integers such that the first divides A and the second divides B
- Sum of all natural numbers from L to R ( for large values of L and R )
- 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 out the prime numbers in the form of A+nB or B+nA
- Check if the Matrix satisfies the given conditions
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Java | Handling TLE While Using Arrays.sort() Function
- Count of Multiples of A ,B or C less than or equal to N
- Sort elements by modulo with K

Given an array arr[] of size n where arr[i] is the amount of candies of type i. You have unlimited amount of money. The task… Read More »

Given an array arr[] of size n, The task is to replace every element of the array by the sum of next two consecutive elements… Read More »

Given an undirected unweighted connected graph consisting of n vertices and m edges. The task is to find any spanning tree of this graph such… Read More »

Given an integer k and an array arr[], the task is to count the number of sub-arrays which have the sum equal to some positive… Read More »

Given two strings s1 and s2 consisting of lowercase English alphabets, the task is to count all the pairs of indices (i, j) from the… Read More »

Given the count of digits 1, 2, 3, 4. Using these digits you are allowed to only form numbers 234 and 12. The task is… Read More »

Given an integer N, the task is to print a good permutation of first N natural numbers. Let’s denote the ith element of the permutation… Read More »

Given an integer N(1<=N<=10^9). The task is to represent N as a sum of the maximum possible number of composite summands and print this maximum… Read More »

Given a number N(1<=N<=2000)., The task is to find the number strings of size N that can be obtained after using characters from 'a' to… Read More »

Given two integers n and m, in a single operation n can be multiplied by either 2 or 3. The task is to convert n… Read More »

Given an integer N ≥ 2, you can split the number as a sum of k integers i.e. N = k1 + k2 + …… Read More »

Given a connected undirected weighted graph with N nodes and M edges. The task is to perform given queries and find the weight of the… Read More »

Given a string str consisting of characters and numbers and an integer k, the task is to decrypt the string and the return the kth… Read More »

Given a range [l, r], the task is to find the sum fib(l) + fib(l + 1) + fib(l + 2) + ….. + fib(r)… Read More »

Given an array of positive and negative elements. The task is to replace every i-th element of the array by the absolute difference of absolute… Read More »