Longest Increasing Subsequence (LeetCode 300) | Detailed solution with animations and diagrams

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

КОМЕНТАРІ • 65

  • @vibhutikumar441
    @vibhutikumar441 9 місяців тому +15

    one of the underrated channels you got 1 more subscriber your explanations are very satisfactory

    • @nikoo28
      @nikoo28  8 місяців тому

      Welcome aboard!

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

    When I'm not able to understand Neetcode solutions, I come to this channel. It feels like you take time to explain in detail and cover small details and use a lot of test cases. Using multiple test cases helps understand the problem better. I subscribed long back. keep up the good work.

  • @dianayao1677
    @dianayao1677 9 місяців тому +2

    Dry run part is the best , you are the only one doing this , I can finally connect the code with the logic. Thank you !!!!

    • @nikoo28
      @nikoo28  8 місяців тому

      so happy you feel that way

  • @sikkjim4846
    @sikkjim4846 9 місяців тому +1

    I just wanna say thank you so much, you are the best programming instructor on youtube, no doubt!

  • @a3rdtierguy864
    @a3rdtierguy864 9 місяців тому +2

    what a great approach definitely everybody should watch i donot have words for your explanation just wow

  • @atifakhtar8828
    @atifakhtar8828 11 днів тому

    wow the way you explain and make it easy is amazing bro you got a subscriber.Keep making amazing videos brother ..hats off and salute

  • @zeyadalbadawy2245
    @zeyadalbadawy2245 2 місяці тому +1

    Sir, Really your explaination is super super simple !!!
    I think it is tha most amazing yt channel

  • @akashskumar6389
    @akashskumar6389 3 місяці тому

    i usually used to check videos with shortest time, but since I started watching your approaches I ended up looking if your videos are there for the questions on priority

  • @saikiran-xh5lt
    @saikiran-xh5lt 4 дні тому

    Adding one to the maximum value is not required. BTW, thanks for your crystal clear explanation.

  • @siddharthaarora4351
    @siddharthaarora4351 21 день тому

    after watching these dp videos, i rechecked my "subscribed" button to check if it is subscribed or not. Great explanation, you are my goto while looking for linkedlist solutions or dp

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

    You have explained it way better.
    An Impressive Guidance to this problem...

  • @a3rdtierguy864
    @a3rdtierguy864 9 місяців тому +4

    WE WANT more series on dp .

  • @enriquegrageda
    @enriquegrageda 8 місяців тому

    I feel like my brain does push ups when i learn from you, thanks bro!

  • @surabhiagnihotri7561
    @surabhiagnihotri7561 9 місяців тому +1

    loved the explanation, super easy you made it! thankyouuu!

  • @generalknow_ledge
    @generalknow_ledge 9 місяців тому +2

    Amazing brother I understand the problem and the solution too. THANKS TO YOU ❤

    • @nikoo28
      @nikoo28  8 місяців тому

      Most welcome 😊

  • @chris5000r
    @chris5000r 9 місяців тому

    I find your videos very helpful in preparation for my upcoming interview

  • @Kripa-bg5tk
    @Kripa-bg5tk 5 місяців тому

    You made the problem seem so easy! Thank you!

  • @peddibharath7016
    @peddibharath7016 9 місяців тому +3

    Great video. Clearly understood

  • @yashpawar2693
    @yashpawar2693 9 місяців тому

    Thanks bro 🔥🔥🙌 found out the best video after lots of searching

    • @nikoo28
      @nikoo28  8 місяців тому

      Your search ends here 😄

  • @aman_rockstar31
    @aman_rockstar31 9 місяців тому +1

    best explanation u make dp easy with ur explanation thanku

  • @sriyanandakuchimanchi4042
    @sriyanandakuchimanchi4042 4 місяці тому

    i was able to figure out this solution myself ,😁😁😁😁,,,just took a little help for code tho...thanks nikhil sir ur teaching is goated

  • @yashyadav7017
    @yashyadav7017 4 місяці тому

    muah….muah…muah…chummi…chummi…chummi….God bless u bhai…top notch teacher….

  • @软件实验室
    @软件实验室 6 місяців тому

    Really clear, keep up the good work!

  • @shristisrivastava7054
    @shristisrivastava7054 3 місяці тому

    Amazing explanation. Thank you for making this video

  • @abhigoku2022
    @abhigoku2022 8 місяців тому

    Hi Sir,
    Eveytime I am searching for a leeetcode problem, I add your name in the suffix hoping you have done a video on it. I have understood each and every video that I have watched. Please do solve all the problems, that will be very helpful for people like me.

  • @frankacquah5416
    @frankacquah5416 9 місяців тому

    Thank you man for this. Nice explanation

  • @a-talks4197
    @a-talks4197 6 місяців тому

    Hats off to you what an amazing explanation :)

    • @nikoo28
      @nikoo28  6 місяців тому

      Thanks a lot 😊

  • @vamsivk984
    @vamsivk984 27 днів тому

    I like the way you teach

  • @yomamasofat413
    @yomamasofat413 3 місяці тому

    great video I like the step by step instructions

  • @cautioni
    @cautioni 7 місяців тому +3

    this solution isn't the most optimised one, atleast according to GFG. it's giving TLE, I really like how you explain, i would request you to make a new video with an accepted solution.

  • @rambhaktuchihaobito7987
    @rambhaktuchihaobito7987 10 місяців тому +1

    wow ...........great explanation :) thank u sir 💟

  • @piyushsinghdtu456
    @piyushsinghdtu456 Місяць тому +1

    very nice sir

  • @kavyakooks5305
    @kavyakooks5305 8 місяців тому

    Great Explanation!!

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

      Glad it was helpful!

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

    Shouldn't it be "return maxIndex + 1" ? Can you check ?

  • @fjhvfjhv143
    @fjhvfjhv143 10 місяців тому

    Which drawing app you use to write this all on iPad? and btw great explaination and please do not forgot to give answer
    👍

    • @nikoo28
      @nikoo28  10 місяців тому

      that is GoodNotes 6.

  • @dsenthilkumar3751
    @dsenthilkumar3751 11 місяців тому +1

    you are really awesome ❤‍🔥 thank you for Eever

    • @nikoo28
      @nikoo28  10 місяців тому

      You rock!

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

    Sorry, I have a quick question, What do you use to draw your diagramans?

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

      That will be GoodNotes 6

  • @thirumalainambi6068
    @thirumalainambi6068 9 місяців тому

    tooooo awesome man

  • @krishnateja3845
    @krishnateja3845 9 місяців тому

    can you tell me why did you avoid using index 2 while backtracking and finding the longest sequence elements 26:00

    • @nikoo28
      @nikoo28  8 місяців тому

      Did you follow the entire logic of the solution explanation or went straight to the code?

    • @devk5061
      @devk5061 8 місяців тому

      ​@@nikoo28you mentioned to backtrack till zero but why u skipped only 2?

  • @mehedihasannnnn
    @mehedihasannnnn 11 місяців тому

    Sir you are awesome. Thank you for this video ❤❤

    • @nikoo28
      @nikoo28  10 місяців тому

      Most welcome 😊

  • @prashanthshetty8337
    @prashanthshetty8337 6 місяців тому

    @nikhil Could you please explain how this solution works? I found this on leet code
    func lengthOfLIS(nums []int) int {
    arr := make([]int, 0)
    for _, num := range nums {
    if len(arr) == 0 || arr[len(arr)-1] < num {
    arr = append(arr, num)
    continue
    }
    // binary search arr find minimum element greater or equal with num
    l, r := 0, len(arr) - 1
    for l

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

      Have you tried using a debugger?

  • @purvajain1024
    @purvajain1024 Місяць тому

    Why we are adding +1 to return value ?

  • @Usseeer_kaizen
    @Usseeer_kaizen 6 місяців тому +1

    nice

  • @21D059MUKESHT
    @21D059MUKESHT 6 місяців тому

    bro please correct it O(n^2) is better than O(2^n) , that brute force is the better approach compared to recursion

  • @umershabir_
    @umershabir_ 10 місяців тому

    Dear Nikhil I love you so much! from Pakistan, I would love to know about you personally! like what actually you do?

    • @nikoo28
      @nikoo28  10 місяців тому

      A software developer.

  • @kolawoleabdulrahman
    @kolawoleabdulrahman 11 місяців тому +3

    Nikhil Lohia > Neetcode.

  • @atifakhtar8828
    @atifakhtar8828 11 днів тому

    just wow

  • @Gaurav_63
    @Gaurav_63 5 днів тому

    it's tabulation not memoization

  • @bharathkumar8807
    @bharathkumar8807 4 місяці тому

    o