We need to prove that in an array representation of heap, the leaves starts at index ⌊n/2⌋+1, ⌊n/2⌋+2 . . .and goes till n, n being the last leaf of the heap.

# Category: C Programming

## Time complexity analysis of merge sort

The heart of merge sort is the merge procedure. Once you understand the merge procedure, understanding merge sort becomes very simple. You can click the links below…

## Time Complexity Analysis of Insertion Sort.

The iterative version of insertion sort was explained here. Check it out, if you have not. In this post, we will analyze the time complexity of iterative insertion sort.

## Selection sort and its time complexity analysis

In this lesson, I will show you the program code for selection sort. Selection sort is one of the most easiest sorting algorithm and the codes are start forward. So, let’s get started.

## Program Code For Recursive Insertion Sort

Iterative insertion sort program code was given here. In this post, the recursive insertion sort is given.

## Insertion Sort Algorithm

The following is the insertion sort algorithm for sorting a array in non-decreasing order and non-increasing order respectively.