## Minimum operations required to change the array such that |arr[i] – M| <= 1

Given an array[] of integers, the task is find the minimum number of operations required to change the array elements such that for any positive… Read More »

- MakeMyTrip Interview Experience 2019
- Make all numbers of an array equal
- Count distinct elements in an array
- Reach the numbers by making jumps of two given lengths
- Check whether an Array is Subarray of another Array
- Largest palindromic number in an array
- Sum of XOR of all subarrays
- Program for K Most Recently Used (MRU) Apps
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Coviam Software Developer Internship Experience
- Minimum operations required to make all the array elements equal
- Longest subsequence such that adjacent elements have at least one common digit
- A Sum Array Puzzle
- Find k closest numbers in an unsorted array
- Smallest Pair Sum in an array
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Maximum of all Subarrays of size k using set in C++ STL
- Count of pairs (x, y) in an array such that x < y
- Number of pairs whose sum is a power of 2
- Count pairs in array whose sum is divisible by K
- Amazon Internship Interview Experience
- Minimum elements to be removed such that sum of adjacent elements is always even
- k-th missing element in an unsorted array
- Length of the longest alternating subarray
- Count array elements that divide the sum of all other elements
- Number of array elements derivable from D after performing certain operations
- Number of unique pairs in an array
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Array Manipulation and Sum
- Python | Using 2D arrays/lists the right way

Given an array[] of integers, the task is find the minimum number of operations required to change the array elements such that for any positive… Read More »

Given a string str containing only lowercase characters. The task is to print the characters having an odd frequency in the order of their occurrence.… Read More »

Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the… Read More »

Given an array arr[] of size N, the task is to check whether the sum of first N – 1 element of the array is… Read More »

Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by… Read More »

Given two arrays u and v, representing a graph such that there is an undirected edge from u[i] to v[i] (0 ≤ v[i], u[i] <… Read More »

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More »

Given two arrays A[] and B[] of equal sizes i.e. N containing integers from 1 to N. The task is to find sub-arrays from the… Read More »

Given an integer arr[], the task is to find an index such that the difference between the product of elements up to that index and… Read More »

Given an array arr[] of integers, the task is to find the maximum sum sub-array among all the possible sub-arrays. Examples: Input: arr[] = {-2,… Read More »

Given a binary array arr[] and q queries of following types: k: find the index of the kth set bit i.e. kth 1 in the… Read More »

Given Preorder, Inorder and Postorder traversals of some tree. The task is to check if they all are of the same tree. Examples: Input :… Read More »

Given an array arr[] and a number K. The task is to find out the number of valid positions i such that (arr[i] + K)… Read More »

If you are not familiar with Least Recently Used Algorithm, check Least Recently Used Algorithm(Page Replacement) This algorithm is a combination of using a queue,… Read More »

Given an unsorted array and two numbers x and k, find k closest values to x. Examples: Input : arr[] = {10, 2, 14, 4,… Read More »