## Sort prime numbers of an array in descending order

Given an array of integers ‘arr’, the task is to sort all the prime numbers from the array in descending order in their relative positions… Read More »

- Count distinct elements in an array
- Print the nodes of binary tree as they become the leaf node
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Sort the array of strings according to alphabetical order defined by another string
- In-Place Merge Sort
- Ternary Search
- Number of pairs whose sum is a power of 2
- Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )
- Minimum Increment / decrement to make array elements equal
- Smallest subarray containing minimum and maximum values
- Check if array can be sorted with one swap
- Find closest value for every element in array
- Check if it is possible to sort the array after rotating it
- Print array elements in alternatively increasing and decreasing order
- Merge K sorted arrays of different sizes | ( Divide and Conquer Approach )
- Internal details of std::sort() in C++
- Sort the array in a given index range
- Maximum sum by picking elements from two arrays in order
- Array element with minimum sum of absolute differences
- Sort only non-prime numbers of an array in increasing order
- Check if the characters of a given string are in alphabetical order
- Largest element in the array that is repeated exactly k times
- Sort an array of string of dates in ascending order
- Average of remaining elements after removing K largest and K smallest elements from array
- K-th lexicographically smallest unique substring of a given string
- Python | Sort list of list by specified index
- Check if words are sorted according to new order of alphabets
- Minimum number of bottles required to fill K glasses
- Make palindromic string non-palindromic by rearranging its letters
- Rearrange an array to maximize i*arr[i]

Given an array of integers ‘arr’, the task is to sort all the prime numbers from the array in descending order in their relative positions… Read More »

Given a map of the city and the network range, the task is to determine the minimum number of the tower so that every house… Read More »

Given a sorted doubly linked list of distinct nodes(no two nodes have the same data) and a value x. The task is to count the… Read More »

Given an array of integers and an integer ‘k’, the task is to find the largest element from the array that is repeated exactly ‘k’… Read More »

Given a string ‘s’, the task is to find if the characters of the string are in alphabetical order. The string contains only lowercase characters.… Read More »

Given an array of N integers. The task is to print the sorted array such that all numbers that are prime stay in the same… Read More »

Given an integer array with duplicate elements. The task is to find the product of all distinct elements in the given array. Examples: Input :… Read More »

Given an array of size N, the task is to determine whether its possible to sort the array or not by just one shuffle. In… Read More »

Given a list of items and their values. The task is to find top k items with the highest value. It is possible that two… Read More »

Given n number of rectangles with it’s L-length and B-Breadth. We can turn any rectangle by 90 degrees. In other words, after turning them, the… Read More »

Quotient – Remainder Sort is a non-comparison based sorting algorithm. Steps to perform Quotient – Remainder sort as described below : Find MIN and MAX… Read More »

Given three sides of the triangle, find the minimum increase in the length of the side of the triangle to make the area of the… Read More »

Given a linked list of size N containing all values from 1 to N. The task is to sort the linked list in increasing order.… Read More »

Given a linked list. The task is to check if the linked list is pairwise sorted or not. A Linked List is considered pairwise sorted… Read More »

Given an array of pairs of integers. The task is to sort the array with respect to second element of the pair. Examples: Input: [(1,… Read More »