# C++ Programming Code Examples

## C++ > Sorting Searching Code Examples

### C++ Program to Implement Counting Sort

Check the Number is Prime or Not in C++ -
To check the number is a "prime number" or not a prime number in C++, enter a number and 'start checking' for prime number. If the number is divisible by 2 to one less than that

C++ Language Implementation For Queue -
Return the least recently inserted item in the queue or throw "Underflow" if empty. Return and remove the least "recently inserted" item from the queue. "Throw Underflow" if empty.

Add Two Matrix Using Multi-Dimensional -
In this program, user is asked to entered the number of rows r & columns c. The value of r & c should be less than 100 in this program. Then, the program adds these two matrices,

C++ Code Solves Tower of Hanoi Problem -
In The C++ program, displays the solution to the Tower of Hanoi problem using the base-2 representation of the move number with the following rules:- There is one binary digit (bit)

C++ Program Reverse an Integer Number -
This takes an integer input from the user and stores it in 'variable n'. Then the while loop is iterated until n != 0 is false. In each iteration, the remainder when the value of n is divided

C++ Programming Code for Selection Sort -
Here, we use 'swapping' of the elements with the help of a Variable say temp of same type. That is, on found, start 'Swapping' with temp variable, place the first number in the temp &

Sum the Integers from 1 to users number -
Sum the integers from 1 to a user-specified number in C programming language. Declare the number of integers to be summed. The loop counter. Sum integers from 1 to count.

Find Intersection & Union of 2 Linked Lists -
This C Program code finds the intersection & union of 2 Linked lists. Intersection is a set of elements that are common in both lists while union is a set of all Unique Elements in both...