← Back to Difficulty Selection
Code Review (Easy): Simplifying Service Labels
Story
While refining the internal logging dashboard at ReviewThat Labs, Mark realized that developers often group related services by using identical starting tags. He asked Lena to create a helper function that could scan a list of these service names and identify the longest shared beginning they all have in common. For instance, if a developer looks at 'storage-main', 'storage-backup', and 'storage-index', the tool should highlight 'storage-' as the shared identifier. Eva reminded them during the review that if the services have nothing in common at all, the function should simply return an empty result to keep the display clean.
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: Finding the Symmetry