DP + Bit Manipulation | Codeforces Weekly Episode 5 | CF 772 Div2 D | Dynamic Programming

Sdílet
Vložit
  • čas přidán 28. 08. 2024
  • Comment Below the Idea you learned !!
    Link of the problem: codeforces.com...
    In this Codeforces Live Series, we pick up one Codeforces problem every week that has some learning and discuss building its intuition and Formulation ideas. This series helps you to pick up good recent problem ideas in a short amount of time.
    🔴 Connect on Instagram: / _i_ek_gupta
    🔴 Linkedin where i post interesting content : / acriader
    ✨ Hashtags ✨
    #codeforces #atcoder #leetcode #VivekGupta #Competititve #CPStreams #engineering #internship
    ______________________________________________________
    Linkedin: / vivekgiit. .
    Instagram: / acraider_here

Komentáře • 26

  • @lostvibes8937
    @lostvibes8937 Před 2 lety +4

    1)Thinking with bits (as string) is something that does not strike easily, if nothing works try to think in this direction too.
    2) The fact that we only need the length as a state variable in DP solution and not the prefix string made so far is worth noting.
    3)In problems involving set generation from subsets, remove the subsets which can be made from a smaller subset already present as the larger will be only give repeated set generation.

  • @rishav144
    @rishav144 Před 2 lety +4

    such a unique and wonderful explanation

  • @nikhilrana2680
    @nikhilrana2680 Před 2 lety

    Bhaiya, the way u explain dp , is just awesome, Maza arha h dp ke question lagane mein...

  • @golirahul7006
    @golirahul7006 Před 2 lety

    what i learnt from this video is " analyzing the constraints can lead to the intution of solving the problem ".

  • @jagteshversinghsahni1735

    learned how to think differently(look differently at a question), dp use for the first time in cp, bit may be related to something you havent thought of

  • @janardhanyarragunta1050

    learnt the way how to make use of each and every info given in the question, to it's peak.

  • @namankumar6356
    @namankumar6356 Před 2 lety

    great explanation... learnt the way to model mathematical operation in terms of bits , also to check for only useful elements to avoid overcounting.

  • @trk7929
    @trk7929 Před 2 lety

    the solution i was waiting for ..thank you bhaiya

  • @advaitanand2524
    @advaitanand2524 Před rokem

    Analysing constraints to get the complexity and intuition
    Breaking down into simpler sub-problems
    Decimal operations and bitwise operations often have correlation

  • @amankori2115
    @amankori2115 Před 2 lety

    Worth the wait!

  • @abdullasulfikkar5282
    @abdullasulfikkar5282 Před 2 lety

    Thank you

  • @darshandarshan-ph6uk
    @darshandarshan-ph6uk Před 2 lety

    thank you so much bro

  • @leviackerman9882
    @leviackerman9882 Před 2 lety

    have you taken a break?
    an update regarding this series will be appreciated as i was enjoying this so much :)

    • @vivekgupta3484
      @vivekgupta3484  Před 2 lety

      Thanks for supporting the series so much. Will make a community post.

    • @leviackerman9882
      @leviackerman9882 Před 2 lety

      @@vivekgupta3484 yes that would be great!

  • @shantanupandey5174
    @shantanupandey5174 Před 2 lety

    10:40 if you look closely you have drawn a monster. :p

  • @akshaysharma7988
    @akshaysharma7988 Před 2 lety

    Aaj hi solve Kiya tha ish que ko😂using stl now lets goo for dp ❣️

  • @svb651
    @svb651 Před 2 lety +1

    At what age did u started coding ?

    • @vivekgupta3484
      @vivekgupta3484  Před 2 lety +1

      i started doing CP from 1st year of my college.

  • @svb651
    @svb651 Před 2 lety

    How much practice do you do

    • @vivekgupta3484
      @vivekgupta3484  Před 2 lety +2

      Now, very less. Used to do a lot of practice a year back.

  • @satvikdixit
    @satvikdixit Před 2 lety

    isnt it just dp[i]=dp[i-1]+dp[i-2]. that what i did if i recall correctly

    • @vivekgupta3484
      @vivekgupta3484  Před 2 lety

      Thats of length exactly i, i have taken

    • @satvikdixit
      @satvikdixit Před 2 lety

      oh i remeber i actually then summed up dp[1]+dp[2]+dp[3]........dp[p] for each ai while u r just returning dp[p]. right ???

    • @vivekgupta3484
      @vivekgupta3484  Před 2 lety

      @@satvikdixit Yes