Design Underground System - Bloomberg 2020 Most Asked Interview Question
🎧 Join the community Discord: https://discord.gg/aVWsAaaCtT
💰 Support me on Patreon: https://www.patreon.com/michaelmuinos
🔗Follow me on LinkedIn: https://www.linkedin.com/in/michael-muinos
📂Follow me on Github: https://github.com/MichaelMuinos
Intro - 00:00
Problem Description - 00:29
Example Walk Through - 01:35
Code Walk Through - 06:15
Complexity Analysis - 13:20
Design Underground System is a popular Leetcode design problem asked significantly at the company Bloomberg. For this problem, we must implement three functions check in, check out, and get average time. There are a couple approached to solve this design question, but the way I explain it is using two maps.
Using hashmaps to solve this problem is the best approach because it will allow you to have a constant time complexity for all functions in your class. For the check in functionality, we must allow a custom to check into a station a certain time. For check out, we must check out a customer at an end station at a specific time. Finally, getting the average time involves taking the average travel time of all previous travel between any two stations. Two maps is perfect for this design because we will always have unique id's for each customer, so we can compute averages in O(1) constant time complexity at any point.
The space complexity of our solution is going to be big oh O(N + M) where N is the number of customers that have checked in and M is the number of customers that have checked out. We must combine both N and M because a customer cannot be checked in and checkout at the same time.
Видео Design Underground System - Bloomberg 2020 Most Asked Interview Question канала Michael Muinos
💰 Support me on Patreon: https://www.patreon.com/michaelmuinos
🔗Follow me on LinkedIn: https://www.linkedin.com/in/michael-muinos
📂Follow me on Github: https://github.com/MichaelMuinos
Intro - 00:00
Problem Description - 00:29
Example Walk Through - 01:35
Code Walk Through - 06:15
Complexity Analysis - 13:20
Design Underground System is a popular Leetcode design problem asked significantly at the company Bloomberg. For this problem, we must implement three functions check in, check out, and get average time. There are a couple approached to solve this design question, but the way I explain it is using two maps.
Using hashmaps to solve this problem is the best approach because it will allow you to have a constant time complexity for all functions in your class. For the check in functionality, we must allow a custom to check into a station a certain time. For check out, we must check out a customer at an end station at a specific time. Finally, getting the average time involves taking the average travel time of all previous travel between any two stations. Two maps is perfect for this design because we will always have unique id's for each customer, so we can compute averages in O(1) constant time complexity at any point.
The space complexity of our solution is going to be big oh O(N + M) where N is the number of customers that have checked in and M is the number of customers that have checked out. We must combine both N and M because a customer cannot be checked in and checkout at the same time.
Видео Design Underground System - Bloomberg 2020 Most Asked Interview Question канала Michael Muinos
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Pass the Bloomberg Hirevue Interview | Bloomberg Video Interview](https://i.ytimg.com/vi/sC_1rtxxgI0/default.jpg)
![Maximum of minimum for every window size | Problem of the Day 02/11/21 | Siddharth Hazra](https://i.ytimg.com/vi/CK8PIAF-m2E/default.jpg)
![Amazon Coding Question - Insert Delete GetRandom O(1)](https://i.ytimg.com/vi/TD2g8UjXMLA/default.jpg)
![Systems Design Interview Concepts (for software engineers / full-stack web)](https://i.ytimg.com/vi/REB_eGHK_P4/default.jpg)
![](https://i.ytimg.com/vi/NiMooCDxW78/default.jpg)
![Cracking the Behavioral Interview for Software Developers](https://i.ytimg.com/vi/ld0cvWnrVsU/default.jpg)
![How I Passed Coding Interviews at Facebook, Google, Lyft, Bloomberg](https://i.ytimg.com/vi/lDTKnzrX6qU/default.jpg)
![Graph Coding Question - All Paths From Source To Target (LeetCode)](https://i.ytimg.com/vi/CYnvDzMprdc/default.jpg)
![7 Common Mistakes in the Coding Interview (for Software Engineers)](https://i.ytimg.com/vi/pV7XIZnsbgM/default.jpg)
![5 Tips for System Design Interviews](https://i.ytimg.com/vi/CtmBGH8MkX4/default.jpg)
![Cyber Security Interview Questions You Must Know (Part 1)](https://i.ytimg.com/vi/jb7T26soBo0/default.jpg)
![SOFTWARE ENGINEERING INTERVIEWS PREPARATION - HOW I PASSED BLOOMBERG AND AMAZON INTERVIEWS | V#14](https://i.ytimg.com/vi/GoHpCapu68o/default.jpg)
![Text Justification Algorithm (LeetCode)](https://i.ytimg.com/vi/GqXlEbFVTXY/default.jpg)
![Trie Data Structure Implementation (LeetCode)](https://i.ytimg.com/vi/giiaIofn31A/default.jpg)
![Design Twitter - Leetcode 355 - Python](https://i.ytimg.com/vi/pNichitDD2E/default.jpg)
![Coding Interview | Software Engineer @ Bloomberg (Part 1)](https://i.ytimg.com/vi/jma9hFQSCDk/default.jpg)
![Job Tips Q & A: 8 Minute Interview with Bloomberg](https://i.ytimg.com/vi/-ci6PBwsPRQ/default.jpg)
![CANDY CRUSH (Leetcode) - Code & Whiteboard](https://i.ytimg.com/vi/p4jExm5Zf6Q/default.jpg)
![Flip Equivalent Binary Trees (Google Coding Question)](https://i.ytimg.com/vi/QrHTec92270/default.jpg)
![Netflix System Design | YouTube System Design | System Design Interview Question](https://i.ytimg.com/vi/lYoSd2WCJTo/default.jpg)