# C++ Programming Examples on Combinatorial Problems & Algorithms

## 1. C++ Programming examples on “Sorting”

Sorting is ordering a list of objects. There are two types of sorting. If the number of objects is small enough to fits into the main memory is called internal sorting. If the number of objects is so large that some of them reside on external storage during the sort is called external sorting. The section contains programs on implementing internal sorting algorithms like bucket sort, bubble sort, insertion sort, selection sort, heapsort and mergesort. this section also provides implementation on other sorting like radix, stooge, shaker, quick and shell sort.

## 2. C++ Programming examples on “Searching”

Searching is an operation or a technique that helps to finds the place of a given element or value in the list. Most commonly used searching technique are linear search or sequential search and binary search. It performs searching using self-organizing lists, reference and uniform binary search, The section contain programs that implement searching algorithms like binary search interpolation algorithms. This section also contains a program to find the largest element, minimum and maximum number in an array or sequence using linear and binary search.

## 3. C++ Programming examples on ” Median and Selection”

Selection sort algorithm sort data by comparing one element to every other element and decide its position. The programs compute median and mode of different elements in an array, implementation of quick sort with given complexity constraint, This section contains a program to find the largest element, smallest number and median using binary search approach and naive method.

## 4. C++ Programming examples on “Generating Permutations and Combinations”

This section contains a program to compute combinations using factorials, recurrence relation for nCr and matrix multiplication, implementation of heaps and alexander bogomolny’s unordered permutation algorithm. program to generate all possible combinations of lists, program to find number of permutations in a given string.

## 5. C++ Programming examples on “Generating Subsets”

This section contains a program to generate subsets in gray code and lexico graphic order, random and all possible subsets by coin flipping and k elements, implementation of binary counting method.

## 6. C++ Programming examples on “Generating Partitions”

The programs in this section generates random and set partitions, program to find the number of ways to partition a word to check word is palindrome and integer partition for a specific case.

## 7. C++ Programming examples on “Generating Graphs”

The section contains programs on generating graphs using adjacency matrix, incidence matrix, 2d arrays, linked lists, adjacency and incidence list, random undirected graph and random directed acyclic graph, program to create prufer code for trees and random graph using random edge generation.

## 8. C++ Programming examples on “Other”

This section contains a program to solve hanoi tower problem using binary value.

C++ program to Solve Tower of Hanoi Problem using Binary Value |

**Here’s the list of 1000 C++ Algorithms, Problems & Programming Examples.**