Problem 1961 · Easy

Check If String Is a Prefix of Array

Check whether the target string can be formed by joining the first few words of a list in order. The visual appends one word at a time to a growing prefix and compares it with the target.

Open the interactive visualisation