Boolean Parenthesization Dynamic Programming | Explained with Code

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. Here you will learn about Boolean Parenthesization. In this question :
    1. You are given a boolean expression with symbols T,F, and operators &,|,^ , where
    T represents True
    F represents False
    & represents boolean AND
    | represents boolean OR
    ^ represents boolean XOR.
    2. You have to find the number of ways in which the expression can be parenthesized so that the value of expression evaluates to true.
    To attempt and submit this question, click here: www.pepcoding....
    For a better experience and more exercises, VISIT: www.pepcoding....
    #dynamicprogramming #interview #questions
    Have a look at our result: www.pepcoding....
    Follow us on our FB page: / pepcoding
    Follow us on Instagram: / pepcoding
    Follow us on LinkedIn: / pepcoding-education

КОМЕНТАРІ • 84

  • @ramjishkl
    @ramjishkl 3 роки тому +25

    After looking at various contents over youtube , can say you have best variety and explanation .I have 8 years of experience and already working in BIG MNC (Expedia) but there is so much to learn in your content .Have shared your content with my siblings and they are loving it .Keep up the good work .

    • @Pepcoding
      @Pepcoding  3 роки тому +13

      I am glad. Your kind words are the kind of motivation that truly help me in making more and more content. Especially, these days, not everybody is generous with motivating anybody either. It means a lot.
      Keep sharing and keep loving Pepcoding😊

  • @444not
    @444not 3 роки тому +14

    This channel is a hidden gem.

  • @vipinamar8323
    @vipinamar8323 2 роки тому +2

    Probably the most difficult coding question to explain, but you just nailed it. You are a true teacher.

  • @themusicalmonk2732
    @themusicalmonk2732 2 роки тому +4

    Thanks!

  • @AmitKumar-zy4gt
    @AmitKumar-zy4gt 3 роки тому

    Wow great!!! I am ready to pay for these type of quality content. Really great. When I read this problem I thought how tough it is. But after watching your video I can code it even after 10 year. Thanks man.

  • @ashutoshranjan8326
    @ashutoshranjan8326 3 роки тому +2

    Certainly the best explanation on this question. Thanks a lot sir

    • @Pepcoding
      @Pepcoding  3 роки тому

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @kannupriyarana4971
    @kannupriyarana4971 3 роки тому +1

    however we thank you and this channel, it will never be enough sir. Such topics so smoothly and now I have started binge watching these videos. You are the bestestestest!!! And I believe that your channel will become one of the most successful ones in future.

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      So nice of you keep motivating, keep learning and keep loving Pepcoding😊

  • @sagargarg4910
    @sagargarg4910 3 роки тому

    question tough hai but aapse smjne k baad khudse sb draw krke dekha toh sb smj aaya or m code b khud likh paya bina dekhe ... Thank you so much :)

  • @vaibhavjain4710
    @vaibhavjain4710 3 роки тому +1

    Every question becomes very easy after watching your video.

  • @ADNANAHMED-eo5xx
    @ADNANAHMED-eo5xx 3 роки тому +6

    sir i have watched your two videos on this topic and have solved this question on my own . But i have not found your gap strategy video, i learned gap strategy just by seeing you implementing. Could u please share the title or the link of gap strategy video . And thanks for the amazing content

    • @ojasdighe991
      @ojasdighe991 2 роки тому +3

      count palindromic substrings in level 1 dp playlist

    • @ADNANAHMED-eo5xx
      @ADNANAHMED-eo5xx 2 роки тому

      @@ojasdighe991 Thanks brother

    • @mohammadkaif8143
      @mohammadkaif8143 2 роки тому

      @ojas Dighe Thanks bro. Your comment should be on the top btw :)

  • @avikhandelwal3172
    @avikhandelwal3172 3 роки тому +1

    Amazing content, best on youtube so far!

  • @factswithai2
    @factswithai2 3 роки тому +1

    sir dil khush ho gaya ye sawal ko karke. Thank u for all the efforts u have been pouring to teach so beautifully and the fact that we already know : "east or west sumeet sir is the best"

    • @Pepcoding
      @Pepcoding  3 роки тому

      Glad to know that you liked the content and thank you for appreciating.
      The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
      So, keep motivating, keep learning and keep loving Pepcoding😊

  • @aman6561
    @aman6561 3 роки тому +1

    khudse sochne me bs itna hi hwaa lgi thi ke gap strategy 2 use hogi kese pta ni . or 2 dp bnegi ye ni socha gya
    fr video dekh ke bhot mzaa aaya saare doubt cover hogye

  • @algoexpert9299
    @algoexpert9299 3 роки тому +4

    Sir , one day I'll pay the full course fees to you. Your explanation and approach is perfectly valuable.

    • @Pepcoding
      @Pepcoding  3 роки тому +17

      Thankyou beta!
      Bs aap dil lgaa k pdo aur aachi jga place ho kr apne ghrvalo k sath sath Pepcoding ka naam bhi roshan kro, bus utna kaafi h mere liye🙏🏼
      And keep learning and keep loving Pepcoding😊

    • @algoexpert9299
      @algoexpert9299 3 роки тому +2

      @@Pepcoding yes sir love and kindness is a highest standard for being a human in life.❤️ Thanks for kind words.

    • @vishwashdwivedi9469
      @vishwashdwivedi9469 3 роки тому +5

      @@Pepcoding No sir , thats not enough !
      Such a great content free of cost is really a great deal to pay !
      As soon as I will get placed , I will surely give credits and gifts too you along with payment of this well deserving course !

  • @jatinyadav5967
    @jatinyadav5967 3 роки тому +1

    Next Level explanation sir ❤️❤️❤️
    I'm thinking now if this question comes in my interview I can explain them so well

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      ua-cam.com/users/Pepcodingabout?view_as=subscriber

    • @jatinyadav5967
      @jatinyadav5967 3 роки тому +1

      @@Pepcoding already subscribed sir❤
      With 🔔
      Also reviewed now
      Keep creating valuable content 🔥🔥

  • @mr.naresh3004
    @mr.naresh3004 2 роки тому

    learning becoming intresting with pepcoding....💡💡🔥🔥

    • @Pepcoding
      @Pepcoding  2 роки тому +1

      Glad to hear that!
      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @aryaraj1898
    @aryaraj1898 2 роки тому

    GREAT EXPLAINATION

  • @abhayteotia4346
    @abhayteotia4346 2 роки тому

    sir,your knowledge and teaching skills are amazing

    • @Pepcoding
      @Pepcoding  2 роки тому

      Glad you liked it!
      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @Phoenix-xi2gy
    @Phoenix-xi2gy 3 роки тому +1

    Mza aagya sir! Bas sir rukna mt kabhi.. Apki vjh se hi muje coding me mze aane lage h aajkl

  • @abhishek__anand__
    @abhishek__anand__ Рік тому

    Great Explanation

  • @vishwashdwivedi9469
    @vishwashdwivedi9469 3 роки тому

    Bohot Bohot shukriya Sir !
    Great teaching !
    Than you so much !

  • @kishormishra6214
    @kishormishra6214 3 роки тому +1

    I think line number 35 to 42 .. it is dpt[][] + = (lfc..).. + sign should be there

  • @editorera239
    @editorera239 3 роки тому

    Thanks sir for giving underlying algo of this peoblem.

  • @anirudhatalmale5575
    @anirudhatalmale5575 3 роки тому

    Such a quality content on youtube

  • @kushagrashekhawat8227
    @kushagrashekhawat8227 3 роки тому +1

    Maaza aa gya. Amazing Explanation.

  • @nknidhi321
    @nknidhi321 2 роки тому

    Kudos ❤️

  • @yashwanthreddysomala6483
    @yashwanthreddysomala6483 3 роки тому

    excellent bro. nicely explained

  • @mukultaneja7243
    @mukultaneja7243 4 роки тому

    Sir can it be done by recursion, with managing "trues" AND "falses" array - side by side ?

  • @jobanpreetsingh2370
    @jobanpreetsingh2370 2 роки тому

    Bhari swaal 💥💥

    • @Pepcoding
      @Pepcoding  2 роки тому

      For much better experience check out nados.pepcoding.com
      All your doubts will be solved there itself

  • @himanshugoyal3862
    @himanshugoyal3862 5 місяців тому

    Can we really expect such level of questions to be asked in interviews ?

  • @theuntoldtree
    @theuntoldtree 2 роки тому

    are gap strategy vaali video hai konsi ye to btado

    • @mohar61
      @mohar61 2 роки тому

      ua-cam.com/video/XmSOWnL6T_I/v-deo.html

    • @ytg6663
      @ytg6663 2 роки тому

      Hahaha

  • @nuamaaniqbal6373
    @nuamaaniqbal6373 2 роки тому

    Thank you sir.!!

    • @Pepcoding
      @Pepcoding  2 роки тому

      Most welcome, for better experience and well organised content sign up on nados.io and start learning.

  • @princegarg1086
    @princegarg1086 4 роки тому +2

    Backtracking + greedy ke ek live class ly loo sir basic to advanced

  • @devilronak7262
    @devilronak7262 3 роки тому

    how to tell the time complexity of recursive dp solution

  • @punitjain4606
    @punitjain4606 3 роки тому +1

    Best :)

    • @Pepcoding
      @Pepcoding  3 роки тому

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      ua-cam.com/users/Pepcodingabout?view_as=subscriber

  • @jayeshpagare547
    @jayeshpagare547 4 роки тому

    Sir cap strategy wala kahapar hai , not able to find on UA-cam
    What is the name of the video sir ?

    • @schwarzenneger9240
      @schwarzenneger9240 4 роки тому +2

      gap strategy : ua-cam.com/video/lvRdFCMD_Ew/v-deo.html

    • @jayeshpagare547
      @jayeshpagare547 4 роки тому +2

      @@schwarzenneger9240 thanks mate 👍👍

  • @aakashsaini9970
    @aakashsaini9970 3 роки тому

    sir plz optimise time to O(N*N)

  • @AnkitSingh-zj2uc
    @AnkitSingh-zj2uc 3 роки тому +2

    ye question koi kyun poochega interview mein
    baccho ki jaan nikaal dega ye to
    btw great explanation

    • @Pepcoding
      @Pepcoding  3 роки тому +1

      Beta isse bhi khatarnaak questions phuche jate h, btw thanks for appreciating. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.

  • @vanditkhuranapvt
    @vanditkhuranapvt 3 роки тому

    Sir time complexity to increase ho jayegi is case mein. O(n^2) nahi hogi

    • @Pepcoding
      @Pepcoding  3 роки тому

      Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.

  • @shubhamdeshmukh9287
    @shubhamdeshmukh9287 3 роки тому

    Real Guru*

    • @Pepcoding
      @Pepcoding  3 роки тому

      Glad to know that you liked the content and thank you for appreciating.
      The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
      So, keep motivating, keep learning and keep loving Pepcoding😊

  • @manishkumarsingh4631
    @manishkumarsingh4631 2 роки тому

    25/79 Done

  • @ueeabhishekkrsahu
    @ueeabhishekkrsahu 3 роки тому

    SIR PLS TEACH SYSTEM DESIGN BCS I SEARCHED EVERYWHERE IN UA-cam BUT NO ONE EXPLAINED IT CLEARLY . pLZ MAKE VIDEOS ON SYSTEM DESIGN

  • @sujoyseal195
    @sujoyseal195 3 роки тому

    👏

  • @karanveersingh5535
    @karanveersingh5535 2 роки тому

    ❤️❤️

  • @abhi6853
    @abhi6853 3 роки тому

    gap strategy ka video bhatao koi tho

  • @shubhamagarwal2998
    @shubhamagarwal2998 3 роки тому

    Concept of Number of subscribers, views, likes are too short to measure your contribution....

  • @surajitroy_roll-5023
    @surajitroy_roll-5023 2 роки тому

    Bhai maine toh hag diya

  • @parallipsenotta3228
    @parallipsenotta3228 Рік тому

    Giving wrong answer on Gfg FOR :
    17
    T|F^F&T|F^F^T^F|T

    • @manpreetsinghrana7751
      @manpreetsinghrana7751 Рік тому

      Sir's soln is correct. In GFG, the values of ouputs are in range of long type. It is mentioned to take modulo 1003 while generating output. Use long dp instead of int dp's and do a 1003 modulo everytime you insert a value in dpt[i][j] or dpf[i][j]. The code will work.