GATE CSE
First time here? Checkout the FAQ!
x
0 votes
114 views
Which of the following sorting algorithm can sort at runtime?

1). Heapsort

2). Merge sort

3). Insertion Sort

4). Selection Sort

This is a self made question. So many options many be correct.
asked in Algorithms by Boss (8.8k points)   | 114 views
what do you mean by sort at runtime?
I think it means on the fly.

As soon as you enter 3, it is sorted, then if you add 2, it becomes 2,3 and 2,3 is stored in the memory. I think this is what it means to 'calculate at runtime'.

1 Answer

0 votes
First of all I did not understand the question properly but I think it should be heapsort as its used for dynamic applications.Whenever you remove elements from top of max (or min heap) the larger (or smaller ) element will rise up to the top.
answered by Junior (677 points)  

First of all there is no any relation bw heap sort and heap data structure.
  heap sort is implemented by array , run time mechanism is depends upon programming lang not an algorithm.
and there is no need to answer every question   :)



Top Users Sep 2017
  1. Habibkhan

    8796 Points

  2. rishu_darkshadow

    3572 Points

  3. Warrior

    2914 Points

  4. Arjun

    2840 Points

  5. A_i_$_h

    2550 Points

  6. manu00x

    2268 Points

  7. nikunj

    1990 Points

  8. Bikram

    1874 Points

  9. makhdoom ghaya

    1820 Points

  10. SiddharthMahapatra

    1718 Points


26,346 questions
33,928 answers
80,525 comments
31,231 users