1422. Maximum Score After Splitting a String | Google | 4 ways | One Pass

Sdílet
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

Komentáře • 10

  • @ARYANMITTAL
    @ARYANMITTAL  Před 6 měsíci +6

    Do once look at all the ways for Interviews❤!!

  • @saikumargatla4706
    @saikumargatla4706 Před 6 měsíci +4

    Last approch of taking total_one as a constant was very unique which i learned today

  • @ashyy346
    @ashyy346 Před 6 měsíci

    Mind blowing!!

  • @sarankumaar6009
    @sarankumaar6009 Před 6 měsíci

    idk how to get that one pass intution without learning the solution . thanks for the video

  • @yashkalia2311
    @yashkalia2311 Před 6 měsíci

    thanks great approach

  • @omkumarjha2745
    @omkumarjha2745 Před 6 měsíci +1

    Last approach is great 🙏

  • @dineshreddygouru6630
    @dineshreddygouru6630 Před 6 měsíci

    Superb Explanation

  • @vijayanks1714
    @vijayanks1714 Před 6 měsíci

    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.

    • @note803
      @note803 Před 6 měsíci

      correction not third but 4th approach

  • @KshitijSharmaMe
    @KshitijSharmaMe Před 6 měsíci

    I think if you can go bit slower and do the passes it will be easier to follow