GATE CSE
First time here? Checkout the FAQ!
x
0 votes
105 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.6k points)   | 105 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 (621 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 May 2017
  1. akash.dinkar12

    3338 Points

  2. pawan kumarln

    2108 Points

  3. Bikram

    1922 Points

  4. sh!va

    1682 Points

  5. Arjun

    1614 Points

  6. Devshree Dubey

    1272 Points

  7. Debashish Deka

    1208 Points

  8. Angkit

    1056 Points

  9. LeenSharma

    1018 Points

  10. Arnab Bhadra

    812 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. Bikram

    1008 Points

  2. pawan kumarln

    734 Points

  3. Arnab Bhadra

    726 Points

  4. Arjun

    342 Points

  5. bharti

    328 Points


22,893 questions
29,196 answers
65,302 comments
27,695 users