Skip to content

Tag Archives: array-rearrange

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., an element… 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[0] >=… Read More
Given an array of positive and negative numbers, arrange them in an alternate fashion such that every positive number is followed by negative and vice-versa… 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. Number… Read More