Skip to content

Conversation

surohitasnigdha1
Copy link

This PR adds the Dutch National Flag algorithm in C++ under the sorting folder.
The algorithm sorts an array containing three distinct elements (e.g., 0, 1, 2)
in a single pass with O(n) time complexity and O(1) extra space.

It includes:

  • Well-commented C++ code
  • Example usage in the main function
  • Explanation of the approach along with a dry run.

This contribution is beginner-friendly and follows the repository's coding guidelines.

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

Successfully merging this pull request may close these issues.

1 participant