Given a string and a positive integer d. Some characters may be repeated in the given string. Rearrange characters of the given string such that the same characters b...

Share

Given a string, Check if characters of the given string can be rearranged to form a palindrome.
For example characters of “geeksogeeks” can be rearrang...

Share

Given a string with repeated characters, task is rearrange characters in a string so that no two adjacent characters are same.
Note : It may be assumed that the strin...

Share

Given a string and a positive integer d. Some characters may be repeated in the given string. Rearrange characters of the given string such that the same characters b...

Share

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 using any a...

Share

Given an array of elements of length N, ranging from 0 to N – 1. All elements may not be present in the array. If element is not present then there will be -1 ...

Share

Given an array of n elements. Our task is to write a program to rearrange the array such that elements at even positions are greater than all elements before it and e...

Share

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 using any a...

Share

Given an array A of n elements, sort the array according to the following relations :
, if i is even.
, if i is odd.
Print the resultant array.
Examples...

Share

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 maintaini...

Share