## Sum of elements in an array whose difference with the mean of another array is less than k

Given two unsorted arrays arr1[] and arr2[]. Find the sum of elements from arr1[] whose difference with the mean of arr2[] is < k. Examples:… Read More »

- Remove duplicates from unsorted array
- MakeMyTrip Interview Experience 2019
- Design a Hit Counter
- Make all numbers of an array equal
- Count distinct elements in an array
- Reach the numbers by making jumps of two given lengths
- How do Dynamic arrays work?
- Check whether an Array is Subarray of another Array
- Largest palindromic number in an array
- Program for K Most Recently Used (MRU) Apps
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Sum of all odd frequency elements in an array
- Coviam Software Developer Internship Experience
- Sum of XOR of all subarrays
- Sum of minimum elements of all subarrays
- Minimum operations required to make all the array elements equal
- Length of the longest Subarray with only Even Elements
- Longest subsequence such that adjacent elements have at least one common digit
- Print all pairs in an unsorted array with equal sum
- A Sum Array Puzzle
- Minimum elements to be removed such that sum of adjacent elements is always even
- Count of pairs (x, y) in an array such that x < y
- Number of pairs whose sum is a power of 2
- Maximum of all Subarrays of size k using set in C++ STL
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Count array elements that divide the sum of all other elements
- Length of the longest alternating subarray
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Find two numbers whose divisors are given in a random order

Given two unsorted arrays arr1[] and arr2[]. Find the sum of elements from arr1[] whose difference with the mean of arr2[] is < k. Examples:… Read More »

Given an array of N numbers. Two players X and Y play a game where at every step one player selects a number. One number… Read More »

Given an array arr[] of n distinct integers. Elements are placed sequentially in ascending order with one element missing. The task is to find the… Read More »

Given an array arr[] of integers and an integer K, the task is to find the maximum sum taking every Kth element i.e. sum =… Read More »

Given an array arr[] of N integers, the task is to sort the array using Shell-Metzner sort. Input: arr[] = {0, -2, 8, 5, 1}… Read More »

Given an array arr[] of size N. The task is to make all the array elements equal by applying the below operations minimum number of… Read More »

Given an array arr[] of size n and q queries and an integer k. Each query consists of an index range [l, r] and the… Read More »

Given N – 1 differences between two consecutive elements of an array containing N numbers which are in range of 1 to N. The task… Read More »

Given a sorted array arr[] of integers and an integer k, the task is to find the count of elements in the array which are… Read More »

Given two arrays arr1[] and arr2[], the task is to take an element from first array (say a) and one element from second array (say… Read More »

Given a binary array arr[] and an integer x, the task is to count all the prefixes of the given array which are divisible by… Read More »

Given a binary array of N numbers. The task is to find the smallest index such that there are either no 1’s or 0’s to… Read More »

Given an array arr[], the task is to count the number of pairs formed by consecutive elements in which both of the elements in a… Read More »

Given an array of N integers. The task is to print the elements from the array which are greater than their immediate previous and next… Read More »

Given a permutation P (P1, P2, P3, … Pn) of first n natural numbers. Find the minimum number of operations to convert it into an… Read More »