(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.3k
- Engineering Mathematics 5.4k
- Digital Logic 2.1k
- Programming & DS 3.9k
- Algorithms 3.4k
- Theory of Computation 4.2k
- Compiler Design 1.6k
- Databases 3.1k
- CO & Architecture 2.7k
- Computer Networks 3.1k
- Non GATE 1.1k
- Others 1.4k
- Admissions 501
- Exam Queries 449
- Tier 1 Placement Questions 19
- Job Queries 62
- Projects 12

37,996 questions

45,492 answers

131,517 comments

48,590 users