Question DSA-ARR-0048
MediumWhat does the Dutch national flag algorithm do?
- A.
Sorts an array of 0s, 1s and 2s in one pass with three pointers
- B.
Rotates an array
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Arrays question
What does the Dutch national flag algorithm do?
Sorts an array of 0s, 1s and 2s in one pass with three pointers
Rotates an array
Sign up free to see the answer and a step-by-step explanation.
Merges two sorted arrays
Finds the maximum subarray