• retagged by
1,309 views

2 Answers

0 0 votes

@_Madhuri

Comparison based sorting algorithm time complexity :

In comparison based sorting, elements of an array are compared with each other to find the sorted array.

 

Best case time complexity:

n when array is already sorted.

 

Worst case:

when the array is reverse sorted.

 

Best, average and worst case time complexity:

n^2 which is independent of distribution of data.

 

@@ https://www.youtube.com/watch?v=WffUZk1pgXE 

 

1. https://gateoverflow.in/85292/comparison-based-sort 

 

2. https://gateoverflow.in/84830/gate-cse-1990-question-3-v 

 

3. https://gateoverflow.in/1026/gate-cse-2004-question-29

 

 

Position:
Show:

Related questions

1 1 vote
1 1 answer
149
149 views
GO Classes asked Aug 25
149 views
Let $P$ be the problem of sorting $n\geq1$ elements using only comparisons.Consider the class of all comparison-based algorithms that correctly solve $P$.What is the asym...
0 0 votes
0 0 answers
904
904 views
Prince Sindhiya asked Aug 23, 2018
904 views
i mark the option D) but answer is A)
0 0 votes
2 2 answers
1.6k
1.6k views
rahul sharma 5 asked Dec 8, 2017
1,618 views
Which of the following sorting techniques have best time complexity, if complexity is measured in terms of number of comparison? A Insertion sortB Selection sortC Merge s...
1 1 vote
1 1 answer
3.8k
3.8k views
LavTheRawkstar asked Sep 11, 2017
3,756 views
What is the ascending wise order of sorting algorithms which takes least time and least space to sort the elements?