## Floor of every element in same array

Given an array of integers, find the closest smaller or same element for every element. If all elements are greater for an element, then print… Read More »

- Amazon Internship Interview Experience
- k-th missing element in an unsorted array
- Sort an array without changing position of negative numbers
- Find the longest string that can be made up of other strings from the array
- Comparison among Bubble Sort, Selection Sort and Insertion Sort
- Count the triplets such that A[i] < B[j] < C[k]
- Two nodes of a BST are swapped, correct the BST | Set-2
- Nagarro Interview Experience Off-campus
- Bubble Sort for Linked List by Swapping nodes
- Greatest contiguous sub-array of size K
- Maximum water that can be stored between two buildings
- Merge two BSTs with constant extra space
- Keep track of previous indexes after sorting a vector in C++ STL
- Find a triplet in an array whose sum is closest to a given number
- Range Queries to Find number of sub-arrays with a given xor
- Find maximum meetings in one room
- Split the array elements into strictly increasing and decreasing sequence
- Pair with largest sum which is less than K in the array
- Iterative selection sort for linked list
- Count pairs with given sum | Set 2
- Find the number of elements greater than k in a sorted array
- Program to print an array in Pendulum Arrangement with constant space
- Maximum Length Chain of Pairs | Set-2
- IntroSort or Introspective sort
- Sort an array of strings based on the frequency of good words in them
- Remove elements to make array sorted
- Divide array into two parts with equal sum according to the given constraints
- Find minimum changes required in an array for it to contain k distinct elements
- Check whether an array can be made strictly decreasing by modifying at most one element
- Unbounded Fractional Knapsack

Given an array of integers, find the closest smaller or same element for every element. If all elements are greater for an element, then print… Read More »

Given an array containing N elements. It is allowed to do the below move any number of times on the array: Choose any L and… Read More »

Given an array of integers, find the closest element for every element. Examples: Input : arr[] = {10, 5, 11, 6, 20, 12} Output :… Read More »

Given an array containing N elements. Find if it is possible to sort it in non-decreasing order using atmost one swap. Examples: Input : arr[]… Read More »

Given an integer K and an array arr each of whose element x represents a square with two of its vertices as (0, 0) and… Read More »

Given a matrix of distinct elements. The task is to sort the rows of matrix in descending order followed by sorting the columns in ascending… Read More »

Given an array of N elements, the task is to convert it into a permutation (Each number from 1 to N occurs exactly once) by… Read More »

Given a binary tree. First print all leaf nodes, after that remove all the leaf nodes from the tree and now print all the new… 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 an integer N, the task is to find N elements which fail the below-sorting algorithm. If none of the N elements fail, then print… Read More »

Implement Merge Sort i.e. standard implementation keeping the sorting algorithm as in-place. In-place means it does not occupy extra memory for merge operation as in… Read More »

Given segments as ranges [L, R] where ranges are non-intersecting and non-overlapping. The task is to find all number between 1 to that doesn’t belong… 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 array arr of N integers, the task is to find the number of elements that satisfy the following condition: If the element is… 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 »