It is pretty strange to see that your videos have that small amount of viewers, but thank you for your effort - I do leetcode regularly for 6 months and for the time being my the best achievement is 345 place in the last biweekly contest. I would not be able to do such a big progress in algorithms/competitive programming that quickly without your help :)
Neetcode changed RUclips channels to neetcodeIO recently and I think a lot of people who used to subscribe didn’t realize it yet. @NeetcodeIO might help with the account migration to post a video on the original channel to divert users to this channel.
Thanks for the video! But I do want to point out that when you sort the array of pairs. It is important to also sort the ages in ascending order when the scores are equal (at least for c++ when writing a custom comparator). If not it will fail the test case when all scores are equal. In your video you said it doesn’t matter on the ages :)
It's possible to get accepted using the first approach in Python. All you need to do is convert the recursive approach to an iterative approach. Another note is that you can optimize the solution by only referencing i + 1 while calculating the solution. This means we can even optimize the solution to have O(n) space complexity, making it the same as the second solution in terms of time and space complexity, but without needing to know anything about LIS (Longest Increasing Subsequence) in advance.
If you do this question on leetcode, you'll notice that some solutions take advantage of the fact that there are never more than 2 duplicates in the test. This allows for sorting, then indexing to be done, resulting in a much simpler solution. But imo this answer is better
I was just reading this leetcode question for like 10 minutes and started feeling sleepy but just when I was just about to fall asleep , it suddenly hit me and I was like wait is this a LIS problem? loll . Yea I am still new to recurssion and stuff but I felt so happy when it hit me that I woke up instantly .. lol it was kinda funny.
Newest style of video edits that deletes gaps between sentences sounds really weird. Much prefer your earlier style where videos included natural gaps between sentences.
@@NeetCodeIO First part of the video, conceptual overview, felt like it was done on a single breath. Pauses are normal only between timestamped chunks of the video. The walkthrough seems more like a run-through, requiring manually pausing video too frequently, in order to understand the explanation.
I see your point, but I'd prefer to keep the videos shorter rather than longer. Having pauses would be subjective, some ppl want them but others wouldn't. Viewers can pause themselves, but they can't cut out the silences.
Explanation of Longest Increasing Subsequence (an easier variation of this problem): ruclips.net/video/cjWnW0hdF1Y/видео.html
It is pretty strange to see that your videos have that small amount of viewers, but thank you for your effort - I do leetcode regularly for 6 months and for the time being my the best achievement is 345 place in the last biweekly contest. I would not be able to do such a big progress in algorithms/competitive programming that quickly without your help :)
it's not a old video that it will have high views
Neetcode changed RUclips channels to neetcodeIO recently and I think a lot of people who used to subscribe didn’t realize it yet.
@NeetcodeIO might help with the account migration to post a video on the original channel to divert users to this channel.
Shouldn't dp[2] be 9 instead of 10, as its basically the max sum of the first three scores that is 1+3+5?
Yep you're right, somehow I messed up the basic addition 🤣
Thanks for the video! But I do want to point out that when you sort the array of pairs. It is important to also sort the ages in ascending order when the scores are equal (at least for c++ when writing a custom comparator). If not it will fail the test case when all scores are equal. In your video you said it doesn’t matter on the ages :)
I don't know how more people mention this! Bless up
lst = [[scores[i], ages[i]] for i in range(len(scores))]
lst.sort(key = lambda x : (x[0], x[1]))
Absolutely loving the daily solutions, thanks a lot 😃
Great solution for the medium-hard (on my opinion) problem. Thank you for sharing it!
It's possible to get accepted using the first approach in Python. All you need to do is convert the recursive approach to an iterative approach. Another note is that you can optimize the solution by only referencing i + 1 while calculating the solution. This means we can even optimize the solution to have O(n) space complexity, making it the same as the second solution in terms of time and space complexity, but without needing to know anything about LIS (Longest Increasing Subsequence) in advance.
If you do this question on leetcode, you'll notice that some solutions take advantage of the fact that there are never more than 2 duplicates in the test. This allows for sorting, then indexing to be done, resulting in a much simpler solution. But imo this answer is better
I was just reading this leetcode question for like 10 minutes and started feeling sleepy but just when I was just about to fall asleep , it suddenly hit me and I was like wait is this a LIS problem? loll . Yea I am still new to recurssion and stuff but I felt so happy when it hit me that I woke up instantly .. lol it was kinda funny.
Same man I also got TLE from recursive python. I think leetcode loaves tabulation
Easiest explanation ever ♥️
Thanks neetcode
I think the memoization solution had a bug inside the add score recursive call. The second parameter shouldn't be i
Beautiful solution
Are these videos also added on the netcode site when they are uploaded? How much time does it take?
I could add them pretty quickly, but the list has over 300 problems and idk how long I want it to get.
Thank you , this is really really helpful
Awesome as always. Thanks.
Awesome explanation
Thank you!
Thank you so much!
Did anyone get the recursive code working?
I think my recursive code was working but it was TLE in python at least
Bro grinding leetcode hard he knows he's going to get Laid :(
...off
Jk bro 🌚your videos are helping me alot too thanks ❤
@@NeetCodeIO RIP is the vibe at Google still down? No one is safe?
@@NeetCodeIO lmfaoo
@@amansarma417 No bro, he is taking it gravely. Now u have to pay for it praising will not work XD
Newest style of video edits that deletes gaps between sentences sounds really weird.
Much prefer your earlier style where videos included natural gaps between sentences.
Are there any specific moments in the video you're referring to? I feel most of my videos are edited this way.
@@NeetCodeIO First part of the video, conceptual overview, felt like it was done on a single breath.
Pauses are normal only between timestamped chunks of the video.
The walkthrough seems more like a run-through, requiring manually pausing video too frequently, in order to understand the explanation.
I see your point, but I'd prefer to keep the videos shorter rather than longer. Having pauses would be subjective, some ppl want them but others wouldn't. Viewers can pause themselves, but they can't cut out the silences.
@@CostaKazistov I also feel the same as you. But now I start watching these video on 0.75x speed, which sounds exactly as before. Try that.