Time Based Key Value Store | Netflix Coding Question | Binary Search

  Рет қаралды 10,591

AlgosWithMichael

AlgosWithMichael

Күн бұрын

Пікірлер: 42
@majellaphilokishore8115
@majellaphilokishore8115 3 жыл бұрын
This video definitely needs a shoutout. I was looking for the exact solution for this kind of problem. Thanks to Mike and the youtube algorithm for suggesting this gem.
@sameer9368
@sameer9368 3 жыл бұрын
I am from India...you explain algorithm like a piece of cake..you definitely deserves a beer . May God bless you
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
So nice of you, thanks for the kind words!
@xueli5641
@xueli5641 3 жыл бұрын
When I search on youtube for a Leetcode question, I know I will definitely understand how to solve it when your video is in the result list. Thanks, Michael!
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
Glad to hear that haha. No problem, anytime!
@wishimaunicorn
@wishimaunicorn Жыл бұрын
I swear no one, i mean NO ONE on the internet could have explain this question better than you. Please do more of these!!!
@noextrasugar
@noextrasugar 4 ай бұрын
Wow!!! Are you my new fav LeetCode teacher?! Subscribed and saveddddd
@ubcomewhatublv
@ubcomewhatublv 2 жыл бұрын
7:49 Not sure if I understand this part correctly. I thought according to your binary search logic, since the mid point corresponding timestamp is 5. We should set left = mid instead of right = mid - 1. In that case, left = 1 and right = 1 which led to while loop condition ends (l < r). But this is just a small bug, this video is very informative. Thanks for your efforts!
@jiecheng.x1306
@jiecheng.x1306 2 жыл бұрын
I agree with that. The while loop will stop when left = right = 1
@hnkien
@hnkien 3 жыл бұрын
Awesome as usual. Thank you very much Michael.
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
My pleasure!
@indola3309
@indola3309 3 жыл бұрын
I was looking for this question yesterday and so needed you to explain it.. thank you so very much..you are the best!!!
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
Happy to help!
@nitanandsingh
@nitanandsingh 2 жыл бұрын
Well Explained. Will wait for more similar videos.
@vedantshinde2277
@vedantshinde2277 3 жыл бұрын
How did I not think about applying a binary search?! This is why it doesn't hurt to compare solutions!!
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
Haha very true!
@IChowdhury01
@IChowdhury01 3 жыл бұрын
Could you do a video on what strategies you use to get interviews while on a job hunt? Stuff like cold emailing, cover letters, reaching out to recruiters on LinkedIn, networking (and how you do it), etc. Would be nice to know what works for you. Thanks. Love your Leetcode videos btw, the graphics help a lot.
@codestorywithMIK
@codestorywithMIK 3 жыл бұрын
I recently got 3 offers. All 3 I got from LinkedIn contacts
@IChowdhury01
@IChowdhury01 3 жыл бұрын
@@codestorywithMIK Did they reach out to you or you hit them up on LinkedIn?
@YashTrivedi21
@YashTrivedi21 3 жыл бұрын
Thanks for the awesome video, I have subscribed you from long time and I can see that your explanations are very crystal clear, thanks for that. Also can you attach question link in each of your video as you explain them? Just a suggestion
@indola3309
@indola3309 3 жыл бұрын
Leetcode 981
@YashTrivedi21
@YashTrivedi21 3 жыл бұрын
@@indola3309 thanks!
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
Good feedback, I will supply the problem in the description from now on
@YashTrivedi21
@YashTrivedi21 3 жыл бұрын
@@AlgosWithMichael appreciated!
@amaansiddiqui9985
@amaansiddiqui9985 4 ай бұрын
Thank you very much cat 🐈‍⬛. Much Appreciated.
@TiffanyNg100
@TiffanyNg100 3 жыл бұрын
best explain, slow and but surely
@anuragtiwari3032
@anuragtiwari3032 3 жыл бұрын
Such a smart cat ❤️❤️
@keepitsimplereal7859
@keepitsimplereal7859 2 жыл бұрын
Hey Michael, would you mind explaining while(l < r ) condition in binary search as you explained when l becomes equal to r, we stop binary seach and also what's the reason behind l = mid assignment after we discover data.get(mid).timestamp
@creativecubs3588
@creativecubs3588 2 жыл бұрын
Nice explanation. Which software you are using for animations?
@LeHoangTu
@LeHoangTu 3 жыл бұрын
Well done! Thank you.
@johnchoe7625
@johnchoe7625 Жыл бұрын
In the binary search, where does the + 1 come from in the "mid = (l + r + 1) / 2" ? I'm only used to doing (l + r) / 2
@worldwide6626
@worldwide6626 Жыл бұрын
Nice video
@CreativeMining413
@CreativeMining413 Жыл бұрын
How do the lists become sorted so you can use binary search? I don't see them being sorted anywhere after we set a new value + timestamp.
@ameynaik2743
@ameynaik2743 3 жыл бұрын
Do you have a video on all the variations of a binary search tree?
@bobma1550
@bobma1550 2 жыл бұрын
can you please explain line 25 ? i thought if (data.get(mid).timestamp == timestamp, then we find the answer, and can return data.get(mid).key ?
@louischou6780
@louischou6780 3 жыл бұрын
why do we need to create a "Data" class? Can we just use another map and store it in the list?
@sadokchebil4391
@sadokchebil4391 3 жыл бұрын
haha I like the cat
@AlgosWithMichael
@AlgosWithMichael 3 жыл бұрын
Hahah thank you :)
@bluesteel1
@bluesteel1 Жыл бұрын
Just store the midpoint whenver there's a match and keep going backwards
@Anubis10110
@Anubis10110 3 жыл бұрын
Why get(A,4) is B Not C ??
@xueli5641
@xueli5641 3 жыл бұрын
At timestamp 4, A was not set to C yet. C was only set at timestamp 5.
Solving Meta's 2022 Most Asked Interview Question
11:40
AlgosWithMichael
Рет қаралды 18 М.
Time Based Key-Value Store | Leetcode 981
21:13
Knowledge Center
Рет қаралды 1,7 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 98 МЛН
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 138 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 13 МЛН
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,6 МЛН
Amazon Coding Question - Insert Delete GetRandom O(1)
11:54
AlgosWithMichael
Рет қаралды 11 М.
Text Justification Algorithm (LeetCode)
30:45
AlgosWithMichael
Рет қаралды 32 М.
Decode String | FAANG Coding Question | Stack
17:03
AlgosWithMichael
Рет қаралды 11 М.
Leetcode 981 Time Based Key-Value Store |  Coding Decoded SDE Sheet
9:09
Time Based Key-Value Store - Leetcode 981 - Python
17:16
NeetCode
Рет қаралды 111 М.
Design Underground System - Bloomberg 2020 Most Asked Interview Question
14:37
Google Coding Question - Divide Chocolate (LeetCode)
16:44
AlgosWithMichael
Рет қаралды 11 М.
Minimum Window Substring | Sliding Window | LeetCode
18:00
AlgosWithMichael
Рет қаралды 40 М.
7 Database Paradigms
9:53
Fireship
Рет қаралды 1,6 МЛН
Time Based Key-Value Store: 981 - faang interview question
17:17
Destination FAANG
Рет қаралды 242
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 98 МЛН