Find Strings with Substring
EPAM
Given an array of strings and a substring, return all strings that contain the substring.
The search should be case-sensitive.
Example:
Input: arr = ["hello", "world", "help"], substring = "hel"
Output: ["hello", "help"]
Examples:
Input 1:
{"arr":["hello","world","help","hi"],"substring":"he"}Output 1:
["hello","help"]Input 2:
{"arr":["test","best","rest"],"substring":"est"}Output 2:
["test","best","rest"]Loading editor...
Run your code to see results
Click the Run button above