Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

# Rearrange a string so that all same characters become d distance away

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

# Check if characters of a given string can be rearranged to form a palindrome

Given a string, Check if characters of the given string can be rearranged to form a palindrome. For example characters of &#x201C;geeksogeeks&#x201D; can be rearrang...

# Rearrange characters in a string such that no two adjacent are same

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

# Rearrange a string so that all same characters become d distance away

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

# Rearrange positive and negative numbers with constant extra space

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

# Rearrange an array such that arr[i] = i

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

# Rearrange array such that arr[i] >= arr[j] if i is even and arr[i]<=arr[j] if i is odd and j < i

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

# Rearrange positive and negative numbers using inbuilt sort function

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

# Rearrange array such that even positioned are greater than odd

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

# Rearrange array in alternating positive & negative items with O(1) extra space Set 1

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