Credit Karma may need to filter search suggestions as a member types into the app. Given a search prefix and an array of suggestion strings, return every suggestion that starts with that prefix.
The comparison is case-sensitive. Preserve the original order and duplicate occurrences from suggestions. If prefix is empty, every suggestion matches. Do not modify the input array.
Implement find_matching_suggestions(prefix, suggestions).
prefix, a string, and suggestions, an array of strings.suggestion.startswith(prefix) is True.def find_matching_suggestions(prefix, suggestions):