3031. Minimum Time to Revert Word to Initial State II | KMP | Weekly Contest 383 | String Matching
Vložit
- čas přidán 27. 07. 2024
- In this video, I'll talk about how to solve Leetcode 3031. Minimum Time to Revert Word to Initial State II | KMP | String Matching Algorithm
3029. Minimum Time to Revert Word to Initial State I
3031. Minimum Time to Revert Word to Initial State II
KMP Algorithm - • Find Beautiful Indices...
Checkout DSA-169 Series: • Aryan DSA-169 Series |...
100Days 100k Placements: • 100 Days 100K Placement
Let's Connect:
📝Linkedin: / aryan-mittal-0077
📸 Instagram: / ez.pz.dsa
📱Telegram : t.me/aryan_mittal_group
🤖 Github: github.com/aryan-0077
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Timelines✨
0:00 - Problem Explanation
2:56 - Intuition Of worst case
12:55 - 3029. Minimum Time to Revert Word to Initial State I
20:22 - 3031. Minimum Time to Revert Word to Initial State II
30:42 - Explaining logic of how lps works internally
39:00 - Code Explanation
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms
you should have discussed the implementation of Z Algo too and the advantage of using Z algo over KMP here or vica versa
bahut pyaara explanation sir(bro).. maja aa gaya especially after watching your KMP lecture
Just Excellent explanation and understanding of concepts. Mark my words , going to be the best channel possible for coding. Bring it on man!
Thank you bro (sir) greetings from Mexico!
Best explanation possible!
thanks a lot
in your code of 1st approach word.substr(0,n-i) and wor.substr(i,n-i) will never be equal as they are of different length . then why we are checking it ?
Bro, n-i is the length & you can see its same 🙃
@@ARYANMITTAL I think the condition should be word.substring(i,n) and not word.substring(i,n-i)
@@SahillKhn He is using C++, in C++ we do via length. But in java i.e. you referring to, it is done via excluding indices.
For java both words are:
word.substring(i, n), word.substring(0, n-i)
bro when will rabinkarp video come..it helps a lot for my interview preparation
kindly upload it ASAP and make 100 days placement vids more regularly!!!
Haan Satwik bhai, iss weekend vahi laaenge sabse phele ❤️❤️🙇
Awesome
bhaiya rabin karp ki video kab ayegi
Dream Fist bhai, lecture written hai, baas 100days 100k placements series ka part hai, toh usi ke video series me Day28 ka part hai, both single Hashing & Double Hashing❤️❤️🙏
Okay bhaiya ❤️🙏