Implement strStr()

Pubblicato il: 27 novembre 2020
sul canale di: Rajiv Gyawali Code Academy
78
1

https://github.com/gyawalirajiv/leetc...

Implement strStr().

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().


In questa pagina del sito puoi guardare il video online Implement strStr() della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Rajiv Gyawali Code Academy 27 novembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 78 volte e gli è piaciuto 1 spettatori. Buona visione!