EXCLUSIVE TIME OF FUNCTIONS | LEETCODE 636 | PYTHON SOLUTION
Vložit
- čas přidán 9. 07. 2024
- Question Link: leetcode.com/problems/exclusi...
DISCORD: Discord Link: / discord
In this video we are solving a popular Facebook interview question: Exclusive Time of Functions (Leetcode # 636).
This question is an interesting one as it's easy to mess up due to a nasty "off-by-1" error you can get if you don't think clearly through this problem. But it's actually really simple to code and reason through so luckily there's that.
TIMESTAMPS:
00:00 Intro
00:15 Question Prompt
02:01 Example & Solution Intuition
07:02 Coding
13:30 Time/Space Complexity
14:45 Outro - Věda a technologie
"F*ck me that was alot"
It's the little things that make me feel less alone in the struggle.
Yup, I went through the same process as you. It's a struggle, it's a pain, some days we want to just give up... but stick with it and eventually you'll be working at FAANG
You explain your solutions as well as the intuition behind them so well, thank you!! This one took me some time to really grasp the timestamp calculations but once it clicked, it clicked really nicely. Great channel have watched a ton of your other videos and all very helpful!
omg, i did not know the functions below can not end before the top one ends. I overcomplicated this problem. That long explanation of the question is so redundant. It should tell us what single threaded means rather than blah blah blah for five paragraphs and took me over 10mins to understand what it is asking.
My hero!! Thanks for this. It had mashed up my brain but your explanation for the solution and asymptotic complexity is great.
Great work! Nice use of the diagram. Thanks.
Bro your explanations are so deep and helps me fully understand the solution.
I have to admit, I've figured out every line myself except like 23, which I had to stare at for hours, take a shower, and then watch this video to figure out just how awful I'm with off-by-one errors.
thank you.
this is gonna be "fun" :D
"F me!, is this an english exam or a lc question?" :💀
"F**k me, that was a lot of reading. Jesus Christ. Is this an English exam?"
We like to have a laugh here 😂
love this energy. 😂
We run a for loop and on each iteration we do a split iteration, so time complexity is N*M, where N is length of logs and M len of each log. Or I'm missing something?
Length of the logs is a fixed size so we don't multiply by M because it's known ahead of time that the length is a certain size. Therefore it's just a fixed constant multiplier on N and asymptotically it can be disregarded
@@crackfaang got it, thanks!
So when they say "starts at 2", they mean it starts at a at the beginning of 2, but when they say "ends at 5", they mean it ends at 5+1, i.e., inclusive?
WTF
That's very misleading