Skip to content

Files

Latest commit

2bae556 · Jul 25, 2023

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 20, 2023
Jul 25, 2023
Feb 7, 2023

Is substring

Instructions

Given two strings implement a function which determines whether the characters in the second string is a substring of the characters in the first string (check if second string exists as continuous/unbroken chain of characters the first string).

Challenge | Solution

Limitations

Don't use String.contains method.

Examples

isSubstring("go home", "ome") // true

isSubstring("go home", "me") // true

isSubstring("go home", "abc") // false

Hints

Hint 1 Use double pointer or recursion