Given an array of n elements. Consider array as circular array i.e element after an is a1. The task is to find maximum sum of… Read More »
Given a sorted array of positive integers, rearrange the array alternately i.e first element should be the maximum value, second minimum value, third-second max, fourth-second… Read More »
Given an array and a range [lowVal, highVal], partition the array around the range such that array is divided in three parts. 1) All elements… Read More »
Given an unsorted array of both negative and positive integer. The task is place all negative element at the end of array without changing the… Read More »
Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., element having… Read More »
Given an array of positive and negative numbers, arrange them such that all negative integers appear before all the positive integers in the array without… Read More »
Given an unsorted array of integers, sort the array into a wave like array. An array ‘arr[0..n-1]’ is sorted in wave form if arr >=… Read More »
An array contains both positive and negative numbers in random order. Rearrange the array elements so that positive and negative numbers are placed alternatively.