## Maximum litres of water that can be bought with N Rupees

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 »

- 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
- Dijkstra's shortest path with minimum edges
- Value in a given range with maximum XOR
- 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
- Count valid pairs in the array satisfying given conditions
- Subarray whose absolute sum is closest to K
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Minimum Increment / decrement to make array elements equal
- Minimum number of 1's to be replaced in a binary array
- 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
- Maximum sum of all elements of array after performing given operations
- Check if a string can be rearranged to form special palindrome
- Minimum number of bottles required to fill K glasses
- Minimum number of adjacent swaps for arranging similar elements together
- Minimum boxes required to carry all gifts
- Lexicographically smallest permutation of a string with given subsequences
- Maximum litres of water that can be bought with N Rupees
- Minimize the difference between the maximum and minimum values of the modified array
- Minimum swaps required to make a binary string alternating
- Check if a number has digits in the given Order

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 »

Given a binary array arr[] of zero’s and one’s only. The task is to find the minimum number of one’s to be changed to zero… Read More »

Given an array A[] of integers. The task is to count total subarrays whose sum is prime with ( size > 1 ). Examples: Input… Read More »

We are given an array of N integers, we need to partition the array into segments such that every element of a segment is greater… Read More »

Given an incomplete bracket sequence S. The task is to find the number of closing brackets ‘)’ needed to make it a regular bracket sequence… Read More »

Given an integer N. The task is to find the lexicographically smallest permutation of integer of the form: 12345…N such that no digit occurs at… Read More »

Given a function F(n) = P – (0.006 * n), where P is given. Given a list of integers and a number, . The task… Read More »

Given an array of integers where . In one operation you can either Increment/Decrement any element by 1. The task is to find the minimum… Read More »

Given an integer array arr, the task is to print the minimum number of operations required to delete all elements of the array. In an… Read More »

Given an integer x, the task is to find if every k-cycle shift on the element produces a number greater than or equal to the… Read More »

Given the number of cities n numbered from 0 to n-1 and the cities in which stations are located, the task is to find the… Read More »

Given an integer array H which represents heights of buildings and an integer K. The task is to reach the last building from the first… Read More »

Given integers N, P and Q where N denotes the destination position. The task is to move from position 0 to position N with minimum… Read More »

Given an integer element ‘N’, the task is to find the minimum number of operations that need to be performed to make ‘N’ equal to… Read More »

Given two sequences of integers ‘A’ and ‘B’, and an integer ‘k’. The task is to check if we can make both sequences equal by… Read More »