"find total sum. assign that to rightsum
traverse from left to right: keep updating left sum and right sum, when they match return the index.
else if you reach end return -1 or not found"
Rahul J. - "find total sum. assign that to rightsum
traverse from left to right: keep updating left sum and right sum, when they match return the index.
else if you reach end return -1 or not found"See full answer
"Used Recursive approach to traverse the binary search tree and sum the values of the nodes that fall within the specified range [low, high]"
Srikant V. - "Used Recursive approach to traverse the binary search tree and sum the values of the nodes that fall within the specified range [low, high]"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
"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
Software Engineer
Coding
+1 more
🧠Want an expert answer to a question? Saving questions lets us know what content to make next.
"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
"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
"Functional Requirement
Ingest Book Reviews in real time
User in the website needs specify title tho search books, return response is the list of reviews on the books.
Non Functional Requirement:
User get real-time book reviews>
It nees to handle the search among 1 million of active users daily"
Simon O. - "Functional Requirement
Ingest Book Reviews in real time
User in the website needs specify title tho search books, return response is the list of reviews on the books.
Non Functional Requirement:
User get real-time book reviews>
It nees to handle the search among 1 million of active users daily"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
"
Compare alternate houses i.e for each house starting from the third, calculate the maximum money that can be stolen up to that house by choosing between:
Skipping the current house and taking the maximum money stolen up to the previous house.
Robbing the current house and adding its value to the maximum money stolen up to the house two steps back.
package main
import (
"fmt"
)
// rob function calculates the maximum money a robber can steal
func maxRob(nums []int) int {
ln"
VContaineers - "
Compare alternate houses i.e for each house starting from the third, calculate the maximum money that can be stolen up to that house by choosing between:
Skipping the current house and taking the maximum money stolen up to the previous house.
Robbing the current house and adding its value to the maximum money stolen up to the house two steps back.
package main
import (
"fmt"
)
// rob function calculates the maximum money a robber can steal
func maxRob(nums []int) int {
ln"See full answer
"Batch Packing Problem
In Amazon’s massive warehouse inventory, there are different types of products. You are given an array products of size n, where products[i] represents the number of items of product type i. These products need to be packed into batches for shipping.
The batch packing must adhere to the following conditions:
No two items in the same batch can be of the same product type.
The number of items packed in the current batch must be strictly greater than the number pack"
Anonymous Goat - "Batch Packing Problem
In Amazon’s massive warehouse inventory, there are different types of products. You are given an array products of size n, where products[i] represents the number of items of product type i. These products need to be packed into batches for shipping.
The batch packing must adhere to the following conditions:
No two items in the same batch can be of the same product type.
The number of items packed in the current batch must be strictly greater than the number pack"See full answer
"I generally struggle with stakeholders and partners who doesn't communicate enough. Now it could be either they don't invest sufficient time and energy in doing so or at times they lack the skill sets to do so. In both the cases, the entire responsibility fell on the other person to dig deep into why someone is doing the way they are doing, reading into patterns and behaviour of their personality and adapting to those communication styles"
Lati K. - "I generally struggle with stakeholders and partners who doesn't communicate enough. Now it could be either they don't invest sufficient time and energy in doing so or at times they lack the skill sets to do so. In both the cases, the entire responsibility fell on the other person to dig deep into why someone is doing the way they are doing, reading into patterns and behaviour of their personality and adapting to those communication styles"See full answer
"I talked about a time that my manager had a better understanding of something than me and that I had to start to ask him what he knew about a certain type of thing once I was getting work assigned"
Anonymous Cheetah - "I talked about a time that my manager had a better understanding of something than me and that I had to start to ask him what he knew about a certain type of thing once I was getting work assigned"See full answer
"
At low level:
I would use two stacks: one for forward history and other for backward history.
i go to tryexponent.com => this url will be stored in backward history stack.
i go to google => again this url will be stored in backward history stack.
i press back => data from backward history will be popped and put in to forward history stack.
I press forward => data from forward history stack will be popped and put in to backward history tab.
Also, whenever i go to any url,"
Anubhav S. - "
At low level:
I would use two stacks: one for forward history and other for backward history.
i go to tryexponent.com => this url will be stored in backward history stack.
i go to google => again this url will be stored in backward history stack.
i press back => data from backward history will be popped and put in to forward history stack.
I press forward => data from forward history stack will be popped and put in to backward history tab.
Also, whenever i go to any url,"See full answer
"S – Situation:
In a university project, my team was building a collaborative code editor. As part of the functionality, we needed a login system so users could securely access their sessions and collaborate in real time.
T – Task:
I was responsible for implementing the authentication system. Initially, I planned to build the entire login system from scratch, including user management, password storage, and session handling. But as the deadline approached, I realized that implementing thi"
Hamzeh H. - "S – Situation:
In a university project, my team was building a collaborative code editor. As part of the functionality, we needed a login system so users could securely access their sessions and collaborate in real time.
T – Task:
I was responsible for implementing the authentication system. Initially, I planned to build the entire login system from scratch, including user management, password storage, and session handling. But as the deadline approached, I realized that implementing thi"See full answer
"Context:
While working as a Senior Systems Engineer at Indra on a project for BBVA, I was primarily responsible for building ETLs and optimizing data pipelines using Spark and Scala.
Action:
During a critical deployment phase, our QA lead had to leave unexpectedly due to a personal emergency. With no one available to manage testing coordination, I volunteered to step in — even though it wasn’t my formal responsibility. I quickly reviewed the test cases, communicated with stakeholders, an"
Otto yhoda A. - "Context:
While working as a Senior Systems Engineer at Indra on a project for BBVA, I was primarily responsible for building ETLs and optimizing data pipelines using Spark and Scala.
Action:
During a critical deployment phase, our QA lead had to leave unexpectedly due to a personal emergency. With no one available to manage testing coordination, I volunteered to step in — even though it wasn’t my formal responsibility. I quickly reviewed the test cases, communicated with stakeholders, an"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
"Function signature for reference:
def calculate(servers: List[int], k: int) -> int:
...
To resolve this, you can use binary search considering left=0 and right=max(servers) * k
so
Example:
servers=[1,4,5] First server handle 1 request in let's say 1 second, second 4 seconds and last 5 seconds.
k=10
So I want to know the minimal time to process 10 requests
Get the mid for timeline
mid = (left+right)//2 -> mid is 25
Check how many we could process
25//1 = 25 25//4=6 25//5=5 so 25 + 6 +"
Babaa - "Function signature for reference:
def calculate(servers: List[int], k: int) -> int:
...
To resolve this, you can use binary search considering left=0 and right=max(servers) * k
so
Example:
servers=[1,4,5] First server handle 1 request in let's say 1 second, second 4 seconds and last 5 seconds.
k=10
So I want to know the minimal time to process 10 requests
Get the mid for timeline
mid = (left+right)//2 -> mid is 25
Check how many we could process
25//1 = 25 25//4=6 25//5=5 so 25 + 6 +"See full answer