The Gateway to Computer Science Excellence
+2 votes
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
I think heap sort is completely impossible for linked list.
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  :

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
100,707 users