## Rearrange an array to maximize i*arr[i]

Given an array of N integers, you have to select all of these integers in any order. For every integer you select, you get points… 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
- Longest subsequence whose average is less than K
- Minimum cost to reach a point N from 0 with two different operations allowed
- Minimum Increment / decrement to make array elements equal
- Subarray whose absolute sum is closest to K
- Minimum number of 1's to be replaced in a binary array
- Prim's Algorithm (Simple Implementation for Adjacency Matrix Representation)
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Dijkstra's shortest path with minimum edges
- Minimum time to reach a point with +t and -t moves at time t
- Water drop problem
- Least Greater number with same digit sum
- Maximize the profit by selling at-most M products
- Minimum boxes required to carry all gifts
- Minimum number of bottles required to fill K glasses
- Minimum swaps required to make a binary string alternating
- Check if a string can be rearranged to form special palindrome
- Find two numbers whose sum and GCD are given
- Lexicographically smallest permutation of a string with given subsequences
- Check if a number has digits in the given Order
- Find length of longest Fibonacci like subsequence
- Minimize the difference between the maximum and minimum values of the modified array
- Find the k smallest numbers after deleting given elements
- Maximum litres of water that can be bought with N Rupees
- Smallest sum contiguous subarray | Set-2

Given an array of N integers, you have to select all of these integers in any order. For every integer you select, you get points… Read More »

Given an array of N integers, rearrange the array elements such that the next array element is greater than the previous element ( > ).… Read More »

Given a list of items and their values. The task is to find k items with the lowest value. It is possible that two items… Read More »

Given an array of integers, find the k smallest numbers after deleting given elements. In case of repeating elements delete only one instance in the… Read More »

Given an array containing weights of gifts, and an integer K representing maximum weight a box can contain (All boxes are uniform). Each box carries… Read More »

Given an array of integers, find the largest number after deleting the given elements. In case of repeating elements, delete one instance for every instance… Read More »

Given a number represented in the form of an array such that each element of the array stores a single digit of the number. That… Read More »

Given a strictly increasing array A of positive integers where, . The task is to find the length of the longest Fibonacci-like subsequence of A.… Read More »

Given an array A containing n integers. The task is to check whether the array is Monotonic or not. An array is monotonic if it… Read More »

Given cost of the ticket ’25’ and an integer array ‘arr’ which holds the values of the notes people in a queue are having (either… Read More »

Given total number of candies ‘X’, number of student ‘N’ and an array ‘arr’ which holds the value for the exact number of candies that… Read More »

Given two integers ‘X’ and ‘N’, the task is to split the integer ‘X’ into exactly ‘N’ parts such that: X1 + X2 + X3… Read More »

Given N glasses having water, and a list A of each of their capacity. The task is to find the minimum number of bottles required… Read More »

Given a positive coordinate ‘X’ and you are at coordinate ‘0’, the task is to find the minimum time required to get to coordinate ‘X’… Read More »

You are given a binary string of even length and equal number of 0’s and 1’s. What is the minimum number of swaps to make… Read More »