Anagram Substring Search
Atlassian interview questions · Easy · Coding round · 6 tests
The input is an array of keywords plus one string of text. Scan the keywords in their given order and return the earliest one for which the text contains a contiguous block of characters that is a rearrangement of that keyword.
Interface
function findFirstMatchingKeyword(keywords: string[], text: string): string;Run your code with Ctrl+Enter to see results.