Longest Increasing Subsequence | Data Structures & Algorithms

Поділитися
Вставка
  • Опубліковано 7 лип 2024
  • Join Jomaclass for full-length videos like this: joma.tech/dsa

КОМЕНТАРІ • 18

  • @ritwikjha156
    @ritwikjha156 3 роки тому +9

    at 7:40 shouldn't the result be 5?

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

    These videos are great I love watching them

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

      Which software is he using to make these videos?

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

    Domo arigato Joma-chan ❤️

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

    which software you use for the drawing.

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

    thats really cool thank you

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

    Hey there can you help me I want to reinstall my windows 10 and I have to download a new Iso file for it but in my area internet is not working what should I do now plz reply

  • @0_-
    @0_- 3 роки тому +1

    If i make a subsequence array and it has a tuple of 2 numbers showing the biggest number in the subsequence and the length
    and then i go through that and if the number i am currently at is bigger than k subsequences in the subsequence array and i change every single one that's smaller than what i am at to the number then that would work the same right?

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

    Love the clear explanation!
    The longest subsequence on the drawing board should be 5 tho

  • @deniz-ke1vm
    @deniz-ke1vm Рік тому

    isn't the magnitude of subsequence for 9 must be 3 (1,8 and 9=3 numbers)

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

    Now try to solve it in O(n * log n) (not O(n ^ 2))

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

      So the cache in Joma's solution is [{The Longest That End With Current Value}], and it make the inner looping O(n)
      I think we can make better cache which is [{length}, {min value that have that length}].
      For example, my cache for [0, 8, 4, 12, 2, 10] would be:
      [
      (1, 0), #for length 1, min val is 0
      (2, 2),
      (3, 10)
      ]
      Doing that, we can binary search the cache on min val when looping and it would take O(log n)
      => The entire thing would be O(n*logn)

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

    can you make a video on O(nlogn) solution?

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

    Class is in session.

  • @LightChu2.7183
    @LightChu2.7183 2 роки тому

    7:39
    answer should be 5!?

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

    Third comment

  • @i.am.jihoonk
    @i.am.jihoonk 3 роки тому +1

    Guess what, I'm the First!