## Sort an array without changing position of negative numbers

Given an array arr[] of N integers, the task is to sort the array without changing the position of negative numbers (if any) i.e. the… Read More »

- Make all numbers of an array equal
- Optimal Strategy for a Game | Set 2
- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Sum of XOR of all subarrays
- Find k closest numbers in an unsorted array
- Count pairs in array whose sum is divisible by K
- Building Heap from Array
- Amazon Internship Interview Experience
- Program for K Most Recently Used (MRU) Apps
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Longest subsequence such that adjacent elements have at least one common digit
- k-th missing element in an unsorted array
- Minimum operations required to make all the array elements equal
- Count of pairs (x, y) in an array such that x < y
- Maximum sum such that no two elements are adjacent | Set 2
- Number of unique pairs in an array
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Maximum element in a sorted and rotated array
- Length of the longest alternating subarray
- Minimum elements to be removed such that sum of adjacent elements is always even
- Given two arrays count all pairs whose sum is an odd number
- Array Manipulation and Sum
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Sort an array without changing position of negative numbers
- Count array elements that divide the sum of all other elements
- Create linked list from a given array
- Find minimum difference between any two elements | Set 2
- Find two numbers whose divisors are given in a random order
- Maximum absolute difference in an array

Given an array arr[] of N integers, the task is to sort the array without changing the position of negative numbers (if any) i.e. the… Read More »

Given an array arr[] of N integers and an integer X, the task is to find three integers in arr[] such that the sum is… Read More »

Given an integer array arr[] of length N consisting of both positive and negative integers, the task is to find the number of sub-arrays with… Read More »

Given an array a[ ] and the number of adjacent swap operations allowed are K. The task is to find the max number that can… Read More »

Given an array of size N.There can be multiple queries of the following types. update(l, r) : On update, flip( multiply a[i] by -1) the… Read More »

Given a set of digits A[] in sorted order and two integers N and K, the task is to find how many numbers of length… Read More »

Given an array arr[] of N integers, the task is to print the largest element among the array such that its previous and next element… Read More »

Given three sorted integer arrays A[], B[] and C[], the task is to find three integers, one from each array such that they sum up… Read More »

Given an array arr[] of n integers. The task is to find the smallest perfect cube from the array. Print -1 if there is no… Read More »

Given an array arr[] of length N. The task is to check if there exists any subarray whose sum is a multiple of N. If… Read More »

Given an array of positive elements, you have to flip the sign of some of its elements such that the resultant sum of the elements… Read More »

Given an array arr[] of integers, the task is to find the maximum sum of any sub-sequence in the array such that any two adjacent… Read More »

Given a string str and an array of strings arr[], the task is to check if the given string can be formed by any of… Read More »

Given n Circles present in x-y plane such that all the circles have their center aligned on the x-axis. The task is to remove some… Read More »

Given infinte number of elements of form and ( n >= 0 ). The task is to find the minimum count of elements chosen such… Read More »