← Back
00:00

Annotate First Pattern Match

Uber interview questions · Easy · Coding round · 6 tests

You are given a sentence text containing words separated by single spaces and an array of candidate patterns.

For each word independently, scan the patterns in the given order. Find the first pattern that appears anywhere inside the word, and wrap the first occurrence of that pattern in square brackets.

Idle