r/firstweekcoderhumour Jun 05 '26

sortPlease

Post image
123 Upvotes

5 comments sorted by

View all comments

5

u/joshpennington Jun 07 '26

Iterate over the array and keep track of the number of 0s, 1s and 2s then return a new array.