GATE CSE
First time here? Checkout the FAQ!
x
0 votes
89 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.3k points)   | 89 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 (557 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 Jan 2017
  1. Debashish Deka

    7172 Points

  2. Habibkhan

    4696 Points

  3. Vijay Thakur

    4308 Points

  4. sudsho

    4090 Points

  5. saurabh rai

    4024 Points

  6. Arjun

    3292 Points

  7. santhoshdevulapally

    3066 Points

  8. GateSet

    3016 Points

  9. Bikram

    3014 Points

  10. Sushant Gokhale

    2892 Points

Monthly Topper: Rs. 500 gift card

18,838 questions
23,808 answers
51,589 comments
20,148 users