Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#123 DutchNationalFlagProblem #23

Open
magicsung opened this issue Jan 5, 2017 · 0 comments
Open

#123 DutchNationalFlagProblem #23

magicsung opened this issue Jan 5, 2017 · 0 comments
Assignees

Comments

@magicsung
Copy link
Collaborator

There is a row of n checkers of three colors: red, white, and blue. Devise an algorithm to rearrange the checkers so that all the red checkers come first, all the white ones come next, and all the blue checkers come last. The only operations allowed are examination of a checker’s color and swap of two checkers. Try to minimize the number of swaps made by your algorithm.

@magicsung magicsung self-assigned this Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant