Question
Computer Science Question on Sorting
What is the number of passes made by bubble sort for a list containing n elements ?
A
n
B
10000 (n-1)
C
(n+1)
D
(n+2)
Answer
10000 (n-1)
Explanation
Solution
The correct option is (B) : 10000 (n-1)
What is the number of passes made by bubble sort for a list containing n elements ?
n
10000 (n-1)
(n+1)
(n+2)
10000 (n-1)
The correct option is (B) : 10000 (n-1)