"Since the problem asks for a O(logN) solution, I have to assume that the numbers are already sorted, meaning the same number are adjacent to each other, the value of the numbers shouldn't matter, and they expect us to use Binary Search.
First, we should analyze the pattern of a regular number array without a single disrupter.
Index: 0 1 2 3 4. 5 6. 7. 8. 9
Array:[1, 1, 2, 2, 4, 4, 5, 5, 6, 6]
notice the odd indexes are always referencing the second of the reoccurring numbers and t"
Bamboo Y. - "Since the problem asks for a O(logN) solution, I have to assume that the numbers are already sorted, meaning the same number are adjacent to each other, the value of the numbers shouldn't matter, and they expect us to use Binary Search.
First, we should analyze the pattern of a regular number array without a single disrupter.
Index: 0 1 2 3 4. 5 6. 7. 8. 9
Array:[1, 1, 2, 2, 4, 4, 5, 5, 6, 6]
notice the odd indexes are always referencing the second of the reoccurring numbers and t"See full answer
"For any project based questions, it is important to structure your response clearly, showcasing your thought process, technical skills, problem-solving abilities, and how your work added value. Besides the STAR method, you can also use this kind of framework:
1. Start by selecting a relevant project (related to the role)
Give the project background and what specific problem it solved.
2. Align the project's objective and your role
Be specific about your role: were you the le"
Malay K. - "For any project based questions, it is important to structure your response clearly, showcasing your thought process, technical skills, problem-solving abilities, and how your work added value. Besides the STAR method, you can also use this kind of framework:
1. Start by selecting a relevant project (related to the role)
Give the project background and what specific problem it solved.
2. Align the project's objective and your role
Be specific about your role: were you the le"See full answer
"I will use below 4 pillars to rate and prioritize those 5 projects:
Analyze the impact of those 5 projects, to our team and to the whole company maybe
Find out if those 5 projects have any dependency between each other
Clarify the timeline of each project
Identity the status of resources to work on those 5 projects and also the status of their dependencies"
Dean Z. - "I will use below 4 pillars to rate and prioritize those 5 projects:
Analyze the impact of those 5 projects, to our team and to the whole company maybe
Find out if those 5 projects have any dependency between each other
Clarify the timeline of each project
Identity the status of resources to work on those 5 projects and also the status of their dependencies"See full answer
"In the Slack system design interview, I proposed a WebSocket-based architecture for real-time messaging, supported by a network of distributed chat servers. To track user connections and route messages efficiently, I leveraged ZooKeeper as a service registry and designed peer-to-peer communication between servers.
For the data layer:
• I used PostgreSQL to manage relational data such as users and chat participants.
• Cassandra was chosen for high-throughput, scalable message storage with dura"
Aneesh M. - "In the Slack system design interview, I proposed a WebSocket-based architecture for real-time messaging, supported by a network of distributed chat servers. To track user connections and route messages efficiently, I leveraged ZooKeeper as a service registry and designed peer-to-peer communication between servers.
For the data layer:
• I used PostgreSQL to manage relational data such as users and chat participants.
• Cassandra was chosen for high-throughput, scalable message storage with dura"See full answer
"I follow a variation of the RICE framework when prioritizing how I ship product features. I start by looking at:
Reach: Because the customer segmentation across our product portfolio is so similar, I tend to hold a lot of weight on product features that will maximize our customer reach with a minimal LOE.
Impact: After establishing which customer segments will benefit from the product feature, I determine the urgency and estimated impact on each customer segment based on customer i"
Ashley C. - "I follow a variation of the RICE framework when prioritizing how I ship product features. I start by looking at:
Reach: Because the customer segmentation across our product portfolio is so similar, I tend to hold a lot of weight on product features that will maximize our customer reach with a minimal LOE.
Impact: After establishing which customer segments will benefit from the product feature, I determine the urgency and estimated impact on each customer segment based on customer i"See full answer
"Request inputs/feedback on my response below with regards to this question and ways to improve and if it looks apt for this question.
As a TPM at xxx, I was responsible for delivering a feature that would provide prescription (medications) alternatives to users in the Prescription Shopping Consumer Experience App. The project had a tight deadline as it was something that our account management team promised to a client who wanted it for their employees. My goal was to ensure smooth development"
Pavani B. - "Request inputs/feedback on my response below with regards to this question and ways to improve and if it looks apt for this question.
As a TPM at xxx, I was responsible for delivering a feature that would provide prescription (medications) alternatives to users in the Prescription Shopping Consumer Experience App. The project had a tight deadline as it was something that our account management team promised to a client who wanted it for their employees. My goal was to ensure smooth development"See full answer
"Sounds like both the features requests address different problems, although it should be clarified in my opinion.
I'd try to dig deep into why the customers are raising the requests to uncover the pain points.
Questions like the following would help:
"How are you currently solving it?"
"What does it mean for you in terms of Cost or productivity?" (based on the context of the product)
"Have you searched for an alternative?"
Descriptive answers for the above questions should tell us if the"
Kapil P. - "Sounds like both the features requests address different problems, although it should be clarified in my opinion.
I'd try to dig deep into why the customers are raising the requests to uncover the pain points.
Questions like the following would help:
"How are you currently solving it?"
"What does it mean for you in terms of Cost or productivity?" (based on the context of the product)
"Have you searched for an alternative?"
Descriptive answers for the above questions should tell us if the"See full answer
"
To clarify on what we are trying to solve for and get the definition of a distributed scheduler straight . So A Distributed Scheduler refers to a system that can handle job scheduling and execution in a scalable and fault-tolerant manner by distributing the workload across multiple servers or nodes.
we will make some assumptions with the design , as follows:
we will assume 10,000 QPS for job submissions and should be able query for jobs status .
Job execution should have minimal latency"
Scott S. - "
To clarify on what we are trying to solve for and get the definition of a distributed scheduler straight . So A Distributed Scheduler refers to a system that can handle job scheduling and execution in a scalable and fault-tolerant manner by distributing the workload across multiple servers or nodes.
we will make some assumptions with the design , as follows:
we will assume 10,000 QPS for job submissions and should be able query for jobs status .
Job execution should have minimal latency"See full answer
"i responded using a multi sourced BFS and in place marking, then i checked the final grid to see if any free spots were left unmarked."
Sh R. - "i responded using a multi sourced BFS and in place marking, then i checked the final grid to see if any free spots were left unmarked."See full answer
"This was a 60 minute assessment. The clock is ticking and you're being observed by a senior+ level engineer. Be ready to perform for an audience.
The implementation for the system gets broken up into three parts:
Implement creating accounts and depositing money into an account by ID
Implement transferring money with validation to ensure the accounts for the transfer both exist and that the account money is being removed from has enough money in it to perform the transfer
Implement find"
devopsjesus - "This was a 60 minute assessment. The clock is ticking and you're being observed by a senior+ level engineer. Be ready to perform for an audience.
The implementation for the system gets broken up into three parts:
Implement creating accounts and depositing money into an account by ID
Implement transferring money with validation to ensure the accounts for the transfer both exist and that the account money is being removed from has enough money in it to perform the transfer
Implement find"See full answer
"We can use dictionary to store cache items so that our read / write operations will be O(1).
Each time we read or update an existing record, we have to ensure the item is moved to the back of the cache. This will allow us to evict the first item in the cache whenever the cache is full and we need to add new records also making our eviction O(1)
Instead of normal dictionary, we will use ordered dictionary to store cache items. This will allow us to efficiently move items to back of the cache a"
Alfred O. - "We can use dictionary to store cache items so that our read / write operations will be O(1).
Each time we read or update an existing record, we have to ensure the item is moved to the back of the cache. This will allow us to evict the first item in the cache whenever the cache is full and we need to add new records also making our eviction O(1)
Instead of normal dictionary, we will use ordered dictionary to store cache items. This will allow us to efficiently move items to back of the cache a"See full answer
"Assumptions:
Platform: iOS/Android and Web Application
Service Type: Renting Bicycles (hourly, daily, weekly), possibility of buying or selling
Geography: Focusing on Asian markets, e.g., India, where bicycles are a popular mode of transportation
Role: Product Manager at Microsoft
Objective: Design an app focusing on customer engagement and new customer acquisition
Setting the Stage: Why a Renting Business?
Market Potential: In Asian markets, a si"
Nagendra S. - "Assumptions:
Platform: iOS/Android and Web Application
Service Type: Renting Bicycles (hourly, daily, weekly), possibility of buying or selling
Geography: Focusing on Asian markets, e.g., India, where bicycles are a popular mode of transportation
Role: Product Manager at Microsoft
Objective: Design an app focusing on customer engagement and new customer acquisition
Setting the Stage: Why a Renting Business?
Market Potential: In Asian markets, a si"See full answer
"\# An program that prints out the peak elements in a list of integers.
Pseudocode:
1. Define a function that takes a list of integers as input.
2. Initialize an empty list to store the peak elements.
3. Loop through the list of integers.
4. For each element, check if it is greater than its neighbors.
5. If it is, add it to the list of peak elements.
6. Return the list of peak elements.
def findpeakelements(nums):
if not nums:
return []
peaks = []
n = len(nums"
Frederick K. - "\# An program that prints out the peak elements in a list of integers.
Pseudocode:
1. Define a function that takes a list of integers as input.
2. Initialize an empty list to store the peak elements.
3. Loop through the list of integers.
4. For each element, check if it is greater than its neighbors.
5. If it is, add it to the list of peak elements.
6. Return the list of peak elements.
def findpeakelements(nums):
if not nums:
return []
peaks = []
n = len(nums"See full answer
"Situation: Our company was going through tech stack updated and our team tasked to migrate existing code into Typescript(TS) and all future development to be written with TS within our codebase.
TASK: Migrate existing codebase to TS and future integration to be TS compatible.
ACTION: The team deep dived into picking up TS skill and learnt some basics and focused on delivering the migration in phases. I prioritised the files to migrate based on levels of complexity. I created a Fil"
Shashank K. - "Situation: Our company was going through tech stack updated and our team tasked to migrate existing code into Typescript(TS) and all future development to be written with TS within our codebase.
TASK: Migrate existing codebase to TS and future integration to be TS compatible.
ACTION: The team deep dived into picking up TS skill and learnt some basics and focused on delivering the migration in phases. I prioritised the files to migrate based on levels of complexity. I created a Fil"See full answer
"I tried solving this problem and here is the recorded video for the answer.
https://www.youtube.com/watch?v=d1tOkeQjyI4
And here is the link to Excalidraw board - https://excalidraw.com/#json=uabNFHcZm5qNh8CInMvyh,Wn9Vf1ZhGdl_iBCQYFkYdw"
Rjj - "I tried solving this problem and here is the recorded video for the answer.
https://www.youtube.com/watch?v=d1tOkeQjyI4
And here is the link to Excalidraw board - https://excalidraw.com/#json=uabNFHcZm5qNh8CInMvyh,Wn9Vf1ZhGdl_iBCQYFkYdw"See full answer
"Since there is a need for the data to be accurate and consistent without any latency to allocate a spot, can't the data be synchronously synced to replicas after every write as the number of writes are not many per min, instead of read lock phenomena
Let me know if i am on a wrong thought here."
Chitapuram N. - "Since there is a need for the data to be accurate and consistent without any latency to allocate a spot, can't the data be synchronously synced to replicas after every write as the number of writes are not many per min, instead of read lock phenomena
Let me know if i am on a wrong thought here."See full answer
"I firstly discuss the brute force approach in O(n^2) time complexity , than i moved to O(nlogn) tine complexity than i discussed the O(n) time complexity and O(n) space complexity . But interviewer want more optimised solution , in O(n) time complexity without using extra space ,
The solution wants O(1) space complexity i have to do changes in same array without using any space . This method is something like i have to place positive values to its original position by swapping and rest negativ"
Anni P. - "I firstly discuss the brute force approach in O(n^2) time complexity , than i moved to O(nlogn) tine complexity than i discussed the O(n) time complexity and O(n) space complexity . But interviewer want more optimised solution , in O(n) time complexity without using extra space ,
The solution wants O(1) space complexity i have to do changes in same array without using any space . This method is something like i have to place positive values to its original position by swapping and rest negativ"See full answer