← Back to Difficulty Selection

Code Review (Easy): Tidying the Event Logs

Story

Lena was working on a utility for the ReviewThat Labs internal dashboard to help keep the sorted event logs tidy. She noticed that the logs frequently recorded the same ID multiple times in a row, so Mark asked her to create a small helper that would push all the unique IDs to the very beginning of the list. For example, if the list contained IDs like [101, 101, 102], the helper should rearrange them so the first two slots are [101, 102] and then let the team know that there are only two items worth looking at. This allows the rest of the system to skip over any redundant data left at the end without needing to create a brand new list from scratch.

Your Task

Read the story and code, then decide if the code is ready for production or needs improvement.

Hints

What would block an approval? Give me a hint.

Next

Check out Next Topic: Cleaning the Activity Feed

Cookies help us track your progress - nothing extra.