1422. Maximum Score After Splitting a String | Google | 4 ways | One Pass
Vložit
- čas přidán 8. 07. 2024
- In this video, I'll talk about how to solve Leetcode 1422. Maximum Score After Splitting a String
Problem Link: leetcode.com/problems/maximum...
Checkout DSA-169 Series: • Aryan DSA-169 Series |...
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
1:06 - Method 1
2:25 - Method 2
4:56 - Method 3
8:30 - Method 4
12:30 - Method 4 coding
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms
Do once look at all the ways for Interviews❤!!
Last approch of taking total_one as a constant was very unique which i learned today
Mind blowing!!
idk how to get that one pass intution without learning the solution . thanks for the video
thanks great approach
Last approach is great 🙏
Superb Explanation
second method ans = 0 is fine but the
third approach must have ans = Integer_min_value reason is we are taking max of (zeroleft - oneleft)
at last we add total_one to the ans if we assign ans = 0 initially it lead the equation fail zeroleft - oneright might be negative if we add total_one with the negative ans then only we get the actual result.
correction not third but 4th approach
I think if you can go bit slower and do the passes it will be easier to follow