Program to find kth samllest element of an unsorted array 

Algorithm :
1) Make a max Heap of first k element.
2) Now from kth element to nth element scan the element one by one and if the element is less than the top element of the heap ie maxHeap[0] then pop the top element of the heap and push the element into the heap.
if element is element is greater than or equal to the top element of the heap than continue to next element without making any changes to the heap.