Given a main string and a target substring, implement a function to find the first occurrence of the substring within the main string. Return the starting index of the substring, or -1 if it does not…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.