Longest Common Subsequence - Dynamic Programming

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Today we discuss how similar the LCS and LIS problems are, and go over a dynamic programming solution.

КОМЕНТАРІ • 18

  • @21kalee
    @21kalee 7 місяців тому

    Many say "what" to do -- "Why" is answered here. Way to go UnderDog.

  • @nourbouzid6376
    @nourbouzid6376 9 років тому

    Great LCS/LIS tutorial, one of the best. Keep it up CSbreakdown, you've got a subscriber.

  • @samarthseth6140
    @samarthseth6140 8 років тому +4

    The first video of CSB which i did understood, good job.

  • @CSBreakdown
    @CSBreakdown  9 років тому +1

    Thanks frfr frfrr! Glad you enjoyed it!

    • @carloancellotti2890
      @carloancellotti2890 6 років тому

      Great video!! It would be helpful for us if you also mention the time complexity for the problems with a small explanation. Thanks.

  • @nebimertaydin3187
    @nebimertaydin3187 6 років тому

    best explanation so far!, great effort

  • @rajhirani3876
    @rajhirani3876 8 років тому

    Superb wonderful explanation !!!!!!!!!!!!!!!!!!!!!!.............................

  • @user-bq6bh9ku2b
    @user-bq6bh9ku2b 8 років тому

    wonderful video!

  • @johnmichaelkovachi3338
    @johnmichaelkovachi3338 6 років тому

    This channel is fucking awesome!

  • @AnantChowdhary
    @AnantChowdhary 7 років тому

    Not sure how at 3:37 , case ii) is correct. x(k) may be equal to a(n) even though a(n) is not equal to b(m)

  • @Angel00Exia
    @Angel00Exia 9 років тому

    Thank you very much! I have one question: would the complexity be the same as that of edit distance O(nm)?

  • @MuhammadUsman-it4mz
    @MuhammadUsman-it4mz 6 років тому

    Much helpful
    :)

  • @ON-ne1rd
    @ON-ne1rd 7 років тому

    What if you use a mix of both up and left arrows when you're borrowing the value from neighbors which have the same value?

  • @tc07client5
    @tc07client5 5 років тому

    Awesome!

  • @effy1219
    @effy1219 7 років тому

    excellent

  • @bynull
    @bynull 6 років тому +1

    Incorrect solution.
    A = z y x w x w z y
    B = w x y x z z
    LCS = y x z
    A string doesn't contain yxz

    • @carloancellotti2890
      @carloancellotti2890 6 років тому +2

      You are wrong. It is not necessary that the LCS should have continuous characters. The only requirement is that the characters in LCS should have their respective indices in increasing order in both strings. In the 'A' string, y,x,z occur at 2nd,3rd and 7th position respectively which are in increasing order.

    • @nebimertaydin3187
      @nebimertaydin3187 6 років тому +4

      :D its common subsequence problem not common substring.