1. Home
  2. Engineering
  3. Computer Engineering
  4. Which of the following has a worst-case time complexity of…

Added 28 Nov 2026

Which of the following has a worst-case time complexity of O(n²)?

  1. Bubble sort Correct answer
  2. A queue
  3. Linear search
  4. A spanning tree of a graph

Correct answer

A. Bubble sort

MCQSEXAM

Explanation

The answer is Bubble sort.

Reference

Asked in: Engineering Computer Engineering Practice

https://en.wikipedia.org/wiki/Data_structure

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Computer Engineering MCQs

Practise all Computer Engineering MCQs

Similar MCQs