← Questions

Split keys into an index and a pattern and check the board

0
DatabricksCodingLast asked Aug 2024

You get a string of digits (the board) and a list of digit-string keys. Cut each key at every position into a non-empty prefix, read as a 0-based index (leading zeros allowed), and a non-empty suffix, the pattern. For each cut, in order of key and then of prefix length, output the pattern if the board contains it starting at that index, else "not found".

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding