## Maximum sum by picking elements from two arrays in order

Given two arrays of size N and two integers X and Y indicating the maximum number of elements one can pick from array A and… Read More »

- Coin game of two corners (Greedy Approach)
- Final cell position in the matrix
- Kruskal's Algorithm (Simple Implementation for Adjacency Matrix)
- Check if an array is Wave Array
- Check if it is possible to sort the array after rotating it
- Value in a given range with maximum XOR
- Dijkstra's shortest path with minimum edges
- Longest subsequence whose average is less than K
- Minimum cost to reach a point N from 0 with two different operations allowed
- Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation)
- Water drop problem
- Minimum Increment / decrement to make array elements equal
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Subarray whose absolute sum is closest to K
- Minimum number of 1's to be replaced in a binary array
- Count valid pairs in the array satisfying given conditions
- Maximum sum by picking elements from two arrays in order
- Maximize the profit by selling at-most M products
- Minimum time to reach a point with +t and -t moves at time t
- Least Greater number with same digit sum
- Check if a string can be rearranged to form special palindrome
- Minimum boxes required to carry all gifts
- Lexicographically smallest permutation of a string with given subsequences
- Minimum number of bottles required to fill K glasses
- Minimum number of adjacent swaps for arranging similar elements together
- Minimum swaps required to make a binary string alternating
- Check if a number has digits in the given Order
- Maximum sum of all elements of array after performing given operations
- Minimize the difference between the maximum and minimum values of the modified array
- Maximum litres of water that can be bought with N Rupees

Given two arrays of size N and two integers X and Y indicating the maximum number of elements one can pick from array A and… Read More »

Given an array arr of N (even) integer elements. The task is to check if it is possible to reorder the elements of the array… Read More »

Given an array of integers arr[], the task is to count the number of valid pairs of elements from arr. A pair (arr[x], arr[y]) is… Read More »

Given an array of integers. The task is to find the maximum sum of all the elements of the array after performing the given two… Read More »

Given an array of integers and an integer . It is allowed to modify an element either by increasing or decreasing them by k (only… Read More »

Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the… Read More »

Prerequisite – CPU Scheduling | Longest Remaining Time First (LRTF) algorithm We have given some process with arrival time and Burst Time and we have… Read More »

Given an integer and an integer array , the task is to find the minimum possible sum of all the elements of the array after… Read More »

Given N line segments where the length of the ith line segment is . The task is to find the maximum number of parallelograms can… Read More »

Given two integer arrays and where stores the ages of different students and an element of stores the number of candies that packet has (complete… Read More »

Given an array which represents the marks of students. The passing grade is and maximum marks that a student can score is , the task… Read More »

Given two integers and , the task is to find the sum of all the numbers within the range [1, n] excluding the numbers which… Read More »

Given a string . Find a string , where B is a palindrome and A is a subsequence of B. A subsequence of a string… Read More »

Given sum and gcd of two numbers and . The task is to find both the numbers a and b. If the numbers do not… Read More »

Given Rupees. A liter plastic bottle of water costs Rupees and a litre of glass bottle of water costs Rupees. But the empty glass bottle… Read More »