Category: Sorting

Sort a vector in C++

In this post, we will discuss how to sort a vector of integers in C++ in ascending order.

Find the surpasser count for each element of an array

Given an array of integers having distinct elements, find the surpasser count for each element in it. In other words, for each element of the array, find the number of elements to its right which are greater than it.