The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
126 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 (9.2k points) | 126 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 Active (1.3k 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   :)



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,154 questions
36,976 answers
92,139 comments
34,816 users