(n-1) swaps to be precise

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+16 votes

Which one of the following is the tightest upper bound that represents the number of swaps required to sort $n$ numbers using selection sort?

- $O(\log n$)
- $O(n$)
- $O(n \log n$)
- $O(n^{2}$)

- All categories
- General Aptitude 1.4k
- Engineering Mathematics 6.3k
- Digital Logic 2.4k
- Programming & DS 4.4k
- Algorithms 3.8k
- Theory of Computation 4.8k
- Compiler Design 1.8k
- Databases 3.5k
- CO & Architecture 3k
- Computer Networks 3.5k
- Non GATE 1.2k
- Others 1.3k
- Admissions 506
- Exam Queries 490
- Tier 1 Placement Questions 23
- Job Queries 64
- Projects 17

42,294 questions

48,415 answers

153,515 comments

62,660 users