Welcome back to another boring leetcode video :)
Today, it's leetcode problem 503. "Next greater element II"!
https://leetcode.com/problems/next-gr...
With C++ code explanation!
I swear this is the last boring video I make, next one will be better, trust.
I made a first version of this video 3 years ago, but it was bad and I didn't published it.
But when I watched it recently, I decided to give it an other try!
Hopefully, it can help some poor souls on their leetcode grind!
Twitter: / computerbread
Subscribe: https://www.youtube.com/@ComputerBrea...
Cool stuff: https://ko-fi.com/s/34966c8fb1
Leetcode playlist: • Interview Question
JavaScript playlist: • JavaScript
Second channel: @computerbreadboard
Timestamps (chapters)
00:00 Problem description
01:19 Brute force solution
03:11 Can we do better?
04:17 A better solution
08:21 Let's summarize
09:13 Code
10:29 Cheer up
things to improve:
pronunciation of "circular"
better explanation
when explaining "appending the array", I should've done it during the brute force solution, not before, not during the pb explaination
should have explained going through the array twice
should have explained the i%n
waste less time on the brute force solution?
run the code on leetcode (forgot about that ^^)
make it a bit more entertaining?