## Maximum Water Between Two Buildings

Given an integer array representing the heights of N buildings, the task is to delete N-2 buildings such that the water that can be trapped between the remaining two building is …

## Smallest Positive missing number in Java

You are given an array arr[] of N integers including 0. The task is to find the smallest positive number missing from the array. Example 1: Input: N = 5 arr[] = {1,2,3,4,5} …

## Count More than n/k Occurences GFG SOlution

Given an array arr[] of size N and an element k. The task is to find all elements in array that appear more than n/k times. Example 1: Input: N = 8 arr[] = {3,1,2,2,1,2,3,3} k …

## Subarray with given sum Solution In Java

Given an unsorted array A of size N that contains only non-negative integers, find a continuous sub-array which adds to a given number S and return the left and right index of that subarray. In case of …

## Median of Two Sorted Arrays GFG Solution in Java

Given two sorted arrays of sizes N and M respectively. The task is to find the median of the two arrays when they get merged.If there are even number of elements in the resulting array, find …