Implementation of Radix Sort in C++

Radix sort is a sorting algorithm that is used to sort numbers. For example, if we are dealing with unsorted numbers, we know that these numbers are formed using digits from 0 to 9. So we need ten places labeled 0 to 9 to unsorted numbers. Radix Sort in C++ So, let’s get started with... » read more

Count Inversion in an Array using C++

The inversions of an array show; how many shifts/turns are needed to turn the array into its sorted form. Inversion Count for an array points out how nearest the array is from being sorted. If an array is already in sorted form, then count inversion 0. Count inversion shall be maximum if the sorted array... » read more

Functional Programming in C++

We all know C++ as Object Oriented Programming language but just like many other widely used object-oriented languages (Java, C# etc), C++ is slowly adopting more features related to functional languages. Its default behavior is imperative but you can write code in a functional style in C++ even more easily than other pure imperative languages... » read more

Calculate Average of Numbers in Arrays using C++

The sample code below is to demonstrate how to calculate the average of integer numbers in an array using C++. It’s a console application that takes the ‘n’ as an argument, which is the number of element to be stored in an array, then calculates the average of those numbers. How does this program work?... » read more