[Java] Leetcode 139. Word Break [DP Distinct Ways #7]

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • In this video, I'm going to show you how to solve Leetcode 139. Word Break which is related to DP Distinct Ways.
    In fact, I also have a whole section of solving leetcode questions and categorize them: czcams.com/users/EricProgram...
    Here’s a quick rundown of what you’re about to learn:
    Course Contents
    (0:00​) Question Walkthrough
    (2:23) Solution Explain
    (6:49) Code
    In the end, you’ll have a really good understanding on how to solve Leetcode 139. Word Break and questions that are similar to DP Distinct Ways.
    Now, if you want to get good at DP Distinct Ways, please checkout my DP Distinct Ways playlist.
    • Leetcode: DP Distinct ...
    💻 Code: github.com/Eric-programming/C...

Komentáře • 4

  • @Moch117
    @Moch117 Před 9 měsíci

    This is probably the best video i've seen on this question. This problem was so tough and i struggled hard to understand it until i went through your video
    Couple of questions :
    1. For questions such as House Robbers I, what would you categorize it as ? It seems like a take/not take , decision making problem
    2. For DP problems, how do you decide to start from the back or the front of the string/array ? Would you consider this problem also under DP on strings ?
    Thanks!

  • @shahbazalam4565
    @shahbazalam4565 Před 3 lety +1

    Very well explained.
    Btw, Are you using a writing pad? And which software are you using for drawing?

    • @EricProgramming
      @EricProgramming  Před 3 lety

      Yes I am using writing pad sometimes. Currently I am using web paint chrome extension to draw

  • @jasonchen8566
    @jasonchen8566 Před měsícem

    // base case
    if (s == null || s.equals("")) return true;
    String right = (i == n)? "": s.substring(i,n);