Median of all non-empty subset sums
Given an array, arr[] of size N, the task is to find the median of sums of all possible subsets of the given array. Examples:… Read More »
Given an array, arr[] of size N, the task is to find the median of sums of all possible subsets of the given array. Examples:… Read More »
Given a string S of length N consisting of ‘x’ and ‘.’. The given string represents a row of seats where ‘x’ and ‘.’ represent… Read More »
Given two integers K, X, and an array arr[] consisting of N distinct elements, the task is to find X elements closest to the Kth… Read More »
Given two arrays arr[] of N integers and W[] of N weights where W[i] is the weight for the element arr[i]. The task is to… Read More »
Given a matrix mat[][] consisting of N pairs of the form {x, y} each denoting coordinates of N points, the task is to find the… Read More »
Given an array arr[] of length N, the task is to find the median of the differences of all pairs of the array elements. Example:… Read More »
Given an array arr[] consisting of N integers, denoting N points lying on the X-axis, the task is to find the point which has the… Read More »
Prerequisite: Sliding Window Median Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum cost required… Read More »
Given an array A[] of size greater than integer K, the task is to find the total number of elements from the array which are… Read More »
Given an array arr[] of N elements and an integer K, the task is to perform at most K operation on the array. In the… Read More »
Given a Perfect BST with N nodes and an integer K, the task is to find the Kth smallest element is present in the tree.… Read More »
Prerequisites: Policy based data structure, Sliding window technique. Given an array of integer arr[] and an integer K, the task is to find the median… Read More »
Given an array A[] of n odd integers and an integer X. Calculate the minimum number of operations required to make the median of the… Read More »
Given three integers A,B and C which denotes length of the three medians of a triangle, the task is to calculate the area of the… Read More »
Given two arrays arr1[] and arr2[]. The array arr1[] is sorted. The task is to print the change in the median after removing each element… Read More »