What is the goal of Sort Colors?

Practice this question from Sort Colors - Dutch National Flag Pattern Practice Quiz, with options and an explanation.

Question

What is the goal of Sort Colors?

Option A — Correct answer

Sort an array of 0s, 1s, and 2s in-place.

Option B

Count graph components only

Option C

Build a frequency table only

Option D

Reverse a linked list only

Explanation

Sort an array of 0s, 1s, and 2s in-place.

Sort Colors - Dutch National Flag Pattern Practice Quiz

All questions · Next question

Open on QuizMaker