GATE CSE
First time here? Checkout the FAQ!
x
0 votes
109 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.7k points)   | 109 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 (639 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 Jul 2017
  1. Bikram

    4386 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1850 Points

  4. joshi_nitish

    1686 Points

  5. Arjun

    1340 Points

  6. Hemant Parihar

    1184 Points

  7. Arnab Bhadra

    1112 Points

  8. Shubhanshu

    1080 Points

  9. Ahwan

    900 Points

  10. rahul sharma 5

    732 Points


24,031 questions
30,983 answers
70,430 comments
29,358 users