← Back to Difficulty Selection

Code Review (Easy): The Log Highlighter

Story

Lena was building a small utility for the company’s log viewer to help the team find specific error patterns quickly. Eva suggested that the tool should pinpoint the exact starting position of a search term within a log entry, or report a negative result if the term isn't found at all. This way, the interface can automatically highlight the first time a problem occurs in a long stream of text. For instance, if a developer searches for the word "sad" within a log that reads "sadbutsad", the system would identify that it first appears right at the start of the message.

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: Filling the Gaps

Cookies help us track your progress - nothing extra.