Given an array of both positive and negative integers, the task is to compute sum of minimum and maximum elements of all sub-array of size k.
Examples:
Input : arr[] ...

Share

Given an array and an integer k, find the maximum for each and every contiguous subarray of size k.
Examples :
Input :
arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}
k = 3
Outp...

Share

Given an array of N distinct element of at least size 2. A pair (a, b) in an array is defined as ‘a’ is the index of second smallest element and ‘...

Share