## Sorting 2D Vector in C++ | Set 2 (In descending order by row and column)

We have discussed some of the cases of sorting 2D vector in below set 1. Sorting 2D Vector in C++ | Set 1 (By row… Read More »

We have discussed some of the cases of sorting 2D vector in below set 1. Sorting 2D Vector in C++ | Set 1 (By row… Read More »

BogoSort also known as permutation sort, stupid sort, slow sort, shotgun sort or monkey sort is a particularly ineffective algorithm based on generate and test… Read More »

Given an sorted array of positive integers, count number of occurrences for each element in the array. Assume all elements in the array are less… Read More »

This is basically a variation of bubble-sort. This algorithm is divided into two phases- Odd and Even Phase. The algorithm runs until the array elements… Read More »

We have discussed some of the cases of sorting vector of pairs in below set 1. Sorting Vector of Pairs in C++ | Set 1… Read More »

What is Vector of Pairs? A pair is a container which stores two values mapped to each other, and a vector containing multiple number of… Read More »

Gnome Sort also called Stupid sort is based on the concept of a Garden Gnome sorting his flower pots. A garden gnome sorts the flower… Read More »

In this algorithm we create different threads for each of the elements in the input array and then each thread sleeps for an amount of… Read More »

We have discussed sorting weapons used by different languages in previous article. In this article, C++’s Sorting Weapon, Introsort is discussed. What is Introsort? Simply… Read More »

Ever wondered how sort() function we use in C++/Java or sorted() in Python work internally? Here is a list of all the inbuilt sorting algorithms… Read More »

Cocktail Sort is a variation of Bubble sort. The Bubble sort algorithm always traverses elements from left and moves the largest element to its correct… Read More »

Given a positive integer, find maximum integer possible by doing at-most K swap operations on its digits. Examples: Input: M = 254, K = 1… Read More »

Given a positive integer n, find the no of factors in n! where n

Given an array that contains odd number of occurrences for all numbers except for a few elements which are present even number of times. Find… Read More »

Given a number n, find number of ways we can add 3 non-negative integers so that their sum is n. Examples : Input : n… Read More »