17. Implement strStr() Theory (LeetCode #28)

Описание к видео 17. Implement strStr() Theory (LeetCode #28)

Problem -
---------------------------
Implement strStr() function.
Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

Clarification:
What should we return when needle is an empty string? This is a great question to ask during an interview.
For the purpose of this problem, we will return 0 when needle is an empty string.
This is consistent to C's strstr() and Java's indexOf().
---------------------------
Leetcode - https://leetcode.com/problems/impleme...
Notes - https://github.com/team-codebug/leetc...
Code (java) - https://github.com/team-codebug/leetc...

Complete Leetcode solutions - EASY playlist :    • (Discontinued) Check new leetcode pla...  
Complete Lectures + Code - https://github.com/team-codebug/leetcode
===========================
➡️ Connect with me:
LinkedIn :   / anuj-kumar-9a188968  
Instagram :   / mr.anuj.brandy  
===========================
#java #indexof #strstr #strings #string #easy_understanding #kmp #solution #theory #notes #leetcode #explanation

Комментарии

Информация по комментариям в разработке