REGULAR EXPRESSION MATCHING (Leetcode) - Code & Whiteboard

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 12

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

    Thank you so much. Appreciate the efforts you made in explaining each statement of recursive solution.

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

    Great explanation. thanks for the video.

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

    Nice one 😇

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

    Thank you for thr detailed explanation

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

    you are awesome!!

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

    Excellent Video. Very helpful and well explained. I do have some confusion about some DP theory. Can you please clarify if this is "Top-Down DP" or "Bottom-UP" DP approach?

    • @babybear-hq9yd
      @babybear-hq9yd  3 роки тому +1

      So glad you liked it! The whole Top Down vs. Bottom Up terminology is something that I still find confusing (and to some extent unnecessary). However, to answer your question, my understanding of the verbiage is that problems you solve using Tabulation (i.e. what we did here) is considered a "Bottom Up" approach, whereas Memoization is considered a "Top Down" approach. That would imply that this method of solving it is a Bottom Up one :)
      It seems that the differences are discussed in much more depth on SO:
      stackoverflow.com/questions/6164629/what-is-the-difference-between-bottom-up-and-top-down

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

    Hello, I am trying to understand basic concept here and I am newbie here. What the statement 'return dp[-1][-1]' do? In the same context in leetcode Top-Down solution what the statement 'return dp(0,0)' do?

    • @babybear-hq9yd
      @babybear-hq9yd  3 роки тому +1

      In Python, we use -1 as an index to refer to the last item in a list. So, dp[-1][-1] returns the element in the final row and final column. dp[0][0] refers to the element in the 0th row and 0th column. I hope that helps!

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

      @@babybear-hq9yd Thank you very much. Yes now it's getting to me.