# C Programming Code Examples

## C > Sorting Searching Code Examples

### C Program - Insertion Sort implementation

C++ Program to Find LCM of two Integers -
Examples on different ways to calculate LCM ("Lowest Common Multiple") of two integers using loops and decision making statements. "LCM of two integers" a and b is the smallest

Finding Last Occurrence of Word in String -
Logic to Search 'Last Occurrence' of a word is almost similar to searching first occurrence of a word in string. Just with last occurrence of a word do not terminate loop if first occurrence

Tower Of Hanoi Alogithm Using Recursion -
C++ Program to implement "Tower Of Hanoi" alogithm using recursion. Shows Movements of disk from one tower to another when a key is pressed. Entering the fibonacci number and

Find Factorial of a Number with Recursion -
C program to find factorial of a number using recursion. The factorial of a 'positive number' n is given by: factorial of n (n!) = 1*2*3*4....n The factorial of a 'negative number' does not

C++ Describe the Representation of graph -
This algorithm represents a given graph using 'Adjacency List'. This method of representing graphs isn't efficient. The time complexity of this algorithm is O(v*e). Print the 'adjacency'

C Earth years to other Planets Conversions -
Display conversions in C. Equivalent mercury years. Equivalent venus years. Equivalent mars years. Equivalent jupiter years. Saturn years. Uranus years, Neptune years, Pluto...

Using Insertion Sort Technique in The C++ -
To sort an array using insertion sort, enter the array size and then array elements in random order. Start Sorting the Elements of the array in Ascending Order using insertion sort as like

Simple Programs Area Of Square Formula -
The second power was described in terms of the area of a square, as in the above formula. It led to the use of the term square to mean raising to the "second power". Thus the area