The Gateway to Computer Science Excellence
+2 votes
298 views
Which of the following is worst choice to sort a linked list?

a)Merge Sort

b) Quick Sort

c) heap sort

d) Insertion sort
in DS by Veteran (117k points) | 298 views
0
I think heap sort is completely impossible for linked list.
0
explain a bit , why do  u think impossible?

1 Answer

0 votes

Heap sort is inefficient on linkedlist

why because

it completely depends on the random access facility of the array, but linked list does not support random access.

ref  : https://stackoverflow.com/questions/10885449/heap-sort-using-linked-lists

by Active (2.4k points)

Related questions

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
50,647 questions
56,492 answers
195,439 comments
100,707 users