🔎 Day 3 of #100DaysOfCode Problem Solved: Implement strStr () (Substring Search) 🚀 Platform: LeetCode 🧠 Concepts Used: Python string manipulation using .find () method ⚙️ Result: • Runtime: 0 ms ...
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. What should we return when needle is an empty string? This is a great question to ask during an ...
在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。
Day 11/100 – Implement strStr() (LeetCode #28) Today I solved a classic substring search problem. The task is to find the index of the first occurrence of one string inside another. 👉 If needle is ...