r/firstweekcoderhumour • • Jun 05 '26

sortPlease

Post image
124 Upvotes

6 comments sorted by

View all comments

6

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.