## Find if k bookings possible with given arrival and departure times

A hotel manager has to process N advance bookings of rooms for the next season. His hotel has K rooms. Bookings contain an arrival date… 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)
- Minimum number of 1's to be replaced in a binary array
- Minimum Increment / decrement to make array elements equal
- Subarray whose absolute sum is closest to K
- Water drop problem
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Count valid pairs in the array satisfying given conditions
- Minimum time to reach a point with +t and -t moves at time t
- Maximize the profit by selling at-most M products
- Least Greater number with same digit sum
- Minimum boxes required to carry all gifts
- Minimum number of bottles required to fill K glasses
- Check if a string can be rearranged to form special palindrome
- Lexicographically smallest permutation of a string with given subsequences
- Minimum swaps required to make a binary string alternating
- Check if a number has digits in the given Order
- Find two numbers whose sum and GCD are given
- Minimize the difference between the maximum and minimum values of the modified array
- Find length of longest Fibonacci like subsequence
- Minimum number of adjacent swaps for arranging similar elements together
- Find the k smallest numbers after deleting given elements

A hotel manager has to process N advance bookings of rooms for the next season. His hotel has K rooms. Bookings contain an arrival date… Read More »

llCommonly used methods: q method explanation isIndeterminate() Gets the value of the property indeterminate. getProgress() Gets the value of the property progress. setProgress(double v) Sets… Read More »

Given an array a, your task is to convert it into a non-increasing form such that we can either increment or decrement the array value… Read More »

Given an array, task is to compute the sum of all possible maximum area rectangle which can be formed from the array elements. Also, you… Read More »

Consider the given array arr[], we need to find if we can sort array with given operation. We are only allowed to reverse subarray such… Read More »

There are n student groups at the school. On each day in school, there are m time slots. A student group may or may not… Read More »

Given an array and k, we need to find the minimum operations needed to make GCD of the array equal or multiple of k. Here… Read More »

Given two arrays of same size, we need to convert the first array into another with minimum operations. In an operation, we can either increment… Read More »

Given an array and a value k. We have to find the maximum number of equal elements possible for the array so that we can… Read More »

Given an array of even number of elements, form groups of 2 using these array elements such that the difference between the group with highest… Read More »

Given an array a, we have to find minimum product possible with the subset of elements present in the array. The minimum product can be… Read More »

Given an array a, we have to find maximum product possible with the subset of elements present in the array. The maximum product can be… Read More »

There are n cores of processor. Each core can process a task at a time. Different cores can process different tasks simultaneously without affecting others.… Read More »

Given a number n, the task is to find the largest perfect cube that can be formed by deleting minimum digits(possibly 0) from the number.… Read More »

Given an array, we need to find the maximum sum of absolute difference of the array elements for a sequence of this array. Examples: Input… Read More »