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

preview_player
Показать описание
Follow along as I implement the popular LeetCode question Time Based Key Value Store. This is a hashmap and binary search problem asked at Netflix, Oracle, Google, Apple, ByteDance, Uber, Microsoft, Twitter, and Amazon.

Check out my interview prep platform for learning the patterns!

🔗 Social 🔗

⭐️ Timestamps ⭐️
00:00 | Intro
00:24 | Problem Statement
01:24 | Example
03:50 | Algorithm Walkthrough
08:04 | Code Walkthrough
13:23 | Time & Space Complexity

----------------------------------------------------
Blue Boi by Lakey Inspired
Рекомендации по теме
Комментарии
Автор

I am from India...you explain algorithm like a piece of cake..you definitely deserves a beer . May God bless you

sameer
Автор

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.

majellaphilokishore
Автор

Wow!!! Are you my new fav LeetCode teacher?! Subscribed and

noextrasugar
Автор

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!

xueli
Автор

I swear no one, i mean NO ONE on the internet could have explain this question better than you. Please do more of these!!!

wishimaunicorn
Автор

How did I not think about applying a binary search?! This is why it doesn't hurt to compare solutions!!

vedantshinde
Автор

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!

ubcomewhatublv
Автор

Thank you very much cat 🐈‍⬛. Much Appreciated.

amaansiddiqui
Автор

I was looking for this question yesterday and so needed you to explain it.. thank you so very much..you are the best!!!

indola
Автор

Awesome as usual. Thank you very much Michael.

hnkien
Автор

Well Explained. Will wait for more similar videos.

nitanandsingh
Автор

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.

IChowdhury
Автор

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

YashTrivedi
Автор

Just store the midpoint whenver there's a match and keep going backwards

bluesteel
Автор

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

johnchoe
Автор

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.

CreativeMining
Автор

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 ?

bobma
Автор

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 <= timestamp?

keepitsimplereal
Автор

Do you have a video on all the variations of a binary search tree?

ameynaik
Автор

Nice explanation. Which software you are using for animations?

creativecubs