Hi I was wondering if someone could help me with this I always get this question alot in interviews and was hoping someone could help with an answers.
if i had 2 strings str1"abcde" and str2 "bcd" create a function that would take both the strings and see if the str1 contains str2 if so return the index of str1 where the str2 is located. if not return -1
Most of the times im using just a bunch of for loops and if statesment but is there a simpler approach to getting this done?