### Shell Sort using C

This method makes repeated use of straight insertion or shuttle sort. An array with n elements, in each pass, an increment is chosen. The increment must be less than n and the increment progressively should be smaller and the last increment must…

### Straight Insertion Sort using C

Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. More details can be found here at https://en.wikipedia.org/wiki/Insertion_sort Let’s say we have an array a, so at each i-th pass, a[i] is…

### Shuttle Sort using C

In Shuttle Sort technique for n elements in an array a, it requires n-1 passes. When i-th pass(1<=i<=n) begins, the first i elements, i.e., elements a[0] to a[i-1] have been sorted and these occupy the first i positions of the array. To…

### Binary Search using C

This example shows how Binary Search Algorithm works. Binary search algorithm is better when an array is sorted because it makes comparison between the search key “k” and middle element of the array. Since the array is sorted, the comparison results either…

### Sequential Search using C

This example shows how Sequential Search algorithm works. Simple way to search for a key value k in an array a is to compare the values of the elements in a with k. The process starts with the first element of the…

### Binary Tree using pointer in C

Binary tree is an important class of tree in data structure. A node in binary tree can have at most two children, which are called sub-trees. Children of a node in binary tree are ordered. One child is called left child and…