Algorithm Archive

Sort an array of 0s, 1s and 2s

If you want to practice data structure and algorithm programs, you can go through 100+ data structure and algorithm programs. In this post, we will see how to sort an array of 0s, 1s and …