## 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 »

- Find the smallest positive number missing from an unsorted array | Set 2
- Merge k sorted arrays | Set 2 (Different Sized Arrays)
- Maximum sum in circular array such that no two elements are adjacent
- Minimum number of items to be delivered
- Calculate the total fine to be collected
- Program to find the Hidden Number
- Amazon Interview Experience
- Next Smaller Element
- Next greater element in same order as input
- Longest subarray having average greater than or equal to x
- Elements that occurred only once in the array
- Print all pairs with given sum
- Coin game of two corners (Greedy Approach)
- Length of the longest Subarray with only Even Elements
- Sum of all odd frequency elements in an array
- Maximum Product Subarray | Set 3
- Maximum profit after buying and selling the stocks
- For each element in 1st array count elements less than or equal to it in 2nd array | Set 2
- Design a Hit Counter
- Sort elements by frequency | Set 5 (using Java Map)
- Find triplets in an array whose AND is maximum
- Number of elements that can be seen from right side
- Remove duplicates from unsorted array
- Check if an array is sorted and rotated clockwise
- Largest subarray having sum greater than k
- Sandvine Interview Experience for FTE 2018
- Number of subsets with sum divisible by m
- Minimum number of swaps required to sort an array | Set 2
- Check whether an Array is Subarray of another Array
- Sort first k values in ascending order and remaining n-k values in descending order

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 »

Given an array a[] of n elements. The task is to find the array (say b[]) of n + 1 such that Greatest Common Divisor… Read More »

We are given a read only array of n integers. Find any element that appears more than n/3 times in the array in linear time… Read More »

Given an array, find the maximum difference between its two consecutive elements in its sorted form. Examples: Input : arr[] = {1, 10, 5} Output… Read More »

Given an array A[] of n elements and an integer k. The task is to find the number of triplet (x, y, k), where 0… Read More »

Given an array of positive integer and q query which contains two integers, L & R. Task is to find the number of set bits… Read More »

Given three integers x, y and z (can be negative). The task is to find the length of the smallest array that can be made… Read More »

Given two arrays among which one is almost sorted with one element being in the wrong position making the array unsorted, the task is to… Read More »

Given an array whose elements represents the coefficients of a polynomial of degree n, if the polynomial has a degree n then the array will… Read More »

Implementing priority CPU scheduling. In this problem, we are using Min Heap as the data structure for implementing priority scheduling. In this problem smaller numbers… Read More »

Given an array arr containing elements from [1…to n]. Each element appears exactly once in the array arr. Given an string str of length n-1.… Read More »

Consider an array of size n with initial 0 values. How many indices will contain value at least x after performing m range updates. In… Read More »

Given two array of size n and m. The task is to find the number of ways we can merge the given arrays into one… Read More »

Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum… Read More »

Given an array a[1..N]. For each element at position i (1 <= i <= N). Where L(i) is defined as closest index j such that… Read More »