retagged by
630 views

2 Answers

0 votes
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

 

 

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
2 answers
2
rahul sharma 5 asked Dec 8, 2017
1,000 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 votes
1 votes
1 answer
3
LavTheRawkstar asked Sep 11, 2017
2,330 views
What is the ascending wise order of sorting algorithms which takes least time and least space to sort the elements?