al-go-rithms
al-go-rithms copied to clipboard
Find the index of the first occurrence in a string. (String Problem)
This is a(n):
- [x] New algorithm
- [ ] Update to an existing algorithm
- [ ] Error
- [ ] Proposal to the Repository
Details: I would like to add a solution to a problem- Find the index of the first occurrence in a string. (Leetcode Problem) (Python).
Description - Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Link - https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/