Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
Annotate First Pattern Match
Easy
Annotate First Pattern Match
You are given a string text containing words separated by spaces, and a list of patterns. For each word in text, find the first substring that matches any pattern (searching patterns in order). Wrap that substring in square brackets []. Only the first match per word is annotated. If no pattern matches a word, leave the word unchanged.
...
Asked at:Uber
More Uber interview questions
- Nested Arithmetic Expression Evaluatormedium
- Process CPU Time Calculatormedium
- Weight Partition Checkmedium
- Hierarchy Path Findermedium
- Unimodal Cost Function Minimummedium
- Straight Line Sequence Searchmedium
- Capital Gains Tax Calculatorhard
- OA [CodeSignal] Adventure Levelshard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.