Heap Sort In Data Structures - Online Code

Description

Heapsort (method) is a comparison-based sorting algorithm, and is part of the selection sort family. Although somewhat slower in practice on most machines than a good implementation of quicksort, it has the advantage of a worst-case Θ(n log n) runtime. Heapsort is an in-place algorithm, but is not a stable sort.

Source Code

/* HEAP SORT */

/* HEAP.C */



# include<stdio.h>

# include<conio.h>

void  heap_sort(int *, int );

void create_heap(int *, int);

void display(int *, int);





void main()

{

	int list[100];

	in
... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.




Comments

No comment yet. Be the first to post a comment.