Check Pattern Presence
tomtom's note: Feel free to check out the source image below for the original problem statement :)
Imagine you're given a string of digits called panel and an array of strings called codes. Each string in the codes array is made up of digits and follows a specific format: "
For example, if the code is "1324", the possible splits would be:
For each code in the codes array, and for every split-case of this code, we'll check whether the pattern appears at the specified index in the panel string. You'll receive a string array as a result, where each element will either be the pattern (if it’s found in the panel at the correct position) or "not found" if it isn’t.
Don’t worry about making your solution the fastest possible, but it should work efficiently enough given the size of the inputs.
⋆˙˳𓂃𓂃𓂃𓊝𓂃𓂃Credit to Charlotte𓂃𓂃𓂃˙˳⋆
1Example 1
Constraints
Limits and guarantees your solution can rely on.
1 ≤ panel.length ≤ 103