← Back to Difficulty Selection

Code Review (Easy): Narrowing the Search

Story

Lena was building a small utility for the team's log viewer to help find specific sets of tags buried in long strings of text. Mark suggested that instead of showing the entire line, the tool should only highlight the shortest possible segment that includes every required tag. For instance, if a developer needs to find the characters 'A', 'B', and 'C' within a sequence like 'ADOBECODEBANC', the utility should pinpoint 'BANC' as the most compact result. This ensures the team isn't distracted by unnecessary noise when debugging complex system outputs.

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: Precise Billing Totals

Cookies help us track your progress - nothing extra.