Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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