"It would have been more interesting to focus on the system design rather than the Trie DS, Interviewee could have just mentioned the Trie and passed to things more important.
Interviewee should have focused on the factors on which he wants to scale the API servers, popularity of the query parts ? region may be ? A hash of many factors ?
Caches should have definitely be discussed, Cache eviction policies, Cache invalidation managements...
Interviewee should have mentioned which kind of API pro"
Aymen D. - "It would have been more interesting to focus on the system design rather than the Trie DS, Interviewee could have just mentioned the Trie and passed to things more important.
Interviewee should have focused on the factors on which he wants to scale the API servers, popularity of the query parts ? region may be ? A hash of many factors ?
Caches should have definitely be discussed, Cache eviction policies, Cache invalidation managements...
Interviewee should have mentioned which kind of API pro"See full answer
"we can use two pointer + set like maintain i,j and also insert jth character to set like while set size is equal to our window j-i+1 then maximize our answer and increase jth pointer till last index"
Kishor J. - "we can use two pointer + set like maintain i,j and also insert jth character to set like while set size is equal to our window j-i+1 then maximize our answer and increase jth pointer till last index"See full answer
"#inplace reversal without inbuilt functions
def reverseString(s):
chars = list(s)
l, r = 0, len(s)-1
while l < r:
chars[l],chars[r] = chars[r],chars[l]
l += 1
r -= 1
reversed = "".join(chars)
return reversed
"
Anonymous Possum - "#inplace reversal without inbuilt functions
def reverseString(s):
chars = list(s)
l, r = 0, len(s)-1
while l < r:
chars[l],chars[r] = chars[r],chars[l]
l += 1
r -= 1
reversed = "".join(chars)
return reversed
"See full answer
"To answer this, I will focus my efforts on explaining the most common type of API used in most modern software development applications - the REST API. For the purpose of simplicity, I will also keep the topics of Authorization and Authentication out of the mix.
In essence, an API is a group of logic that takes in a specific set of inputs and responds with a specific set of outputs. This is analogous to going to a drive-thru and placing an order for a meal.
When you give an API a bunch of"
Pathworks P. - "To answer this, I will focus my efforts on explaining the most common type of API used in most modern software development applications - the REST API. For the purpose of simplicity, I will also keep the topics of Authorization and Authentication out of the mix.
In essence, an API is a group of logic that takes in a specific set of inputs and responds with a specific set of outputs. This is analogous to going to a drive-thru and placing an order for a meal.
When you give an API a bunch of"See full answer
"Average case - lookup/insert/delete - o(1) -> assuming a low load factor and uniform hash distribution.
Worst case - o(n) -> where are keys collide in same bucket"
Kargi C. - "Average case - lookup/insert/delete - o(1) -> assuming a low load factor and uniform hash distribution.
Worst case - o(n) -> where are keys collide in same bucket"See full answer
"Time taken: 25 minutes
My approach:
I would start by listing the use cases, what could be the length of cable needed, quantifying each and weight average those.
The % make the assumption that it is what it represents the share in the total nb of iphone recharges. In fact total should be more than 100% because it not exclusive but for sake of simplicity let’s say it tops at 100%.
\# In details:
charging next to bed: 50%generally speaking there is a bedside table that is 80 cm high and the"
Adaneir W. - "Time taken: 25 minutes
My approach:
I would start by listing the use cases, what could be the length of cable needed, quantifying each and weight average those.
The % make the assumption that it is what it represents the share in the total nb of iphone recharges. In fact total should be more than 100% because it not exclusive but for sake of simplicity let’s say it tops at 100%.
\# In details:
charging next to bed: 50%generally speaking there is a bedside table that is 80 cm high and the"See full answer
"
The Situation
A few months ago, our trading platform started experiencing significant latency issues during peak trading hours. This latency was affecting our ability to process real-time market data and execute trades efficiently, potentially leading to substantial financial losses and missed opportunities.
Identifying the Problem
The first step was to identify the root cause of the latency. I organized a team meeting with our data engineers, DevOps, and network specialists to gather"
Scott S. - "
The Situation
A few months ago, our trading platform started experiencing significant latency issues during peak trading hours. This latency was affecting our ability to process real-time market data and execute trades efficiently, potentially leading to substantial financial losses and missed opportunities.
Identifying the Problem
The first step was to identify the root cause of the latency. I organized a team meeting with our data engineers, DevOps, and network specialists to gather"See full answer
"this assumes that the dependency among courses is in a growing order:
0 -> 1 -> 2 -> ...
if not, then the code will not work"
Gabriele G. - "this assumes that the dependency among courses is in a growing order:
0 -> 1 -> 2 -> ...
if not, then the code will not work"See full answer
"Should be able to charge the airpod case when pluged into energy.
Should be able to charge when the airpod case has battery.
Should be able to alert if the airpod case is out of battery.
Should be able to sync with non-paired devices.
Should be able to sync automatically with paired devices.
Should be able to sync automatically with paired devices that are closer to the airpod.
Should be able to switch the connection to a device answering a call.
Should be able to pause during us"
Daniel M. - "Should be able to charge the airpod case when pluged into energy.
Should be able to charge when the airpod case has battery.
Should be able to alert if the airpod case is out of battery.
Should be able to sync with non-paired devices.
Should be able to sync automatically with paired devices.
Should be able to sync automatically with paired devices that are closer to the airpod.
Should be able to switch the connection to a device answering a call.
Should be able to pause during us"See full answer
"First of all, stack and heap memory are abstraction on top of the hardware by the compiler. The hardware is not aware of stack and heap memory. There is only a single piece of memory that a program has access to. The compiler creates the concepts of stack and heap memory to run the programs efficiently.
Programs use stack memory to store local variables and a few important register values such as frame pointer and return address for program counter. This makes it easier for the compiler to gene"
Stanley Y. - "First of all, stack and heap memory are abstraction on top of the hardware by the compiler. The hardware is not aware of stack and heap memory. There is only a single piece of memory that a program has access to. The compiler creates the concepts of stack and heap memory to run the programs efficiently.
Programs use stack memory to store local variables and a few important register values such as frame pointer and return address for program counter. This makes it easier for the compiler to gene"See full answer
"In 2019, I was given a very important problem to solve. In a team of 3 we had to build a mobility assist device. The customer segment we would go for was something we could decide. The project was very close to me as I had lost someone I loved because of cancer and I saw how reduced mobility was a huge pain point in not being able to do physical activities. My team could only think of elderly people as the main target market.
As the Head of Product what I did was:
1) I helped them dive even d"
Soumya S. - "In 2019, I was given a very important problem to solve. In a team of 3 we had to build a mobility assist device. The customer segment we would go for was something we could decide. The project was very close to me as I had lost someone I loved because of cancer and I saw how reduced mobility was a huge pain point in not being able to do physical activities. My team could only think of elderly people as the main target market.
As the Head of Product what I did was:
1) I helped them dive even d"See full answer
"this solution here is much faster than the exponent reference soln. It is also far more concise and easy to understand
def moveZerosToEnd(arr: List[int]) -> List[int]:
left = 0
for right in range(len(arr)):
if arr[right] == 0:
pass
else:
if left != right:
temp = arr[left]
arr[left] = arr[right]
arr[right] = temp
left += 1
return arr
`"
Devesh K. - "this solution here is much faster than the exponent reference soln. It is also far more concise and easy to understand
def moveZerosToEnd(arr: List[int]) -> List[int]:
left = 0
for right in range(len(arr)):
if arr[right] == 0:
pass
else:
if left != right:
temp = arr[left]
arr[left] = arr[right]
arr[right] = temp
left += 1
return arr
`"See full answer
"Situation - A time I had to think “outside of the box” was while I was at Google working on hotel solutions for smart displays. Smart displays are mutli-modal meaning they accommodate both touch and voice. I was given the task of leading the effort of scaling a new third party solution on top of our existing first party design system. However, the pandemic caused an unfortunate turn of events in that the needs of guests changed drastically and now needed a much more voice forward solution for"
Ben G. - "Situation - A time I had to think “outside of the box” was while I was at Google working on hotel solutions for smart displays. Smart displays are mutli-modal meaning they accommodate both touch and voice. I was given the task of leading the effort of scaling a new third party solution on top of our existing first party design system. However, the pandemic caused an unfortunate turn of events in that the needs of guests changed drastically and now needed a much more voice forward solution for"See full answer
"In python
def find_duplicates(arr1: List[int], arr2: List[int]) -> List[int]:
result = list(set(arr1) & set(arr2))
return result
"
Sammy R. - "In python
def find_duplicates(arr1: List[int], arr2: List[int]) -> List[int]:
result = list(set(arr1) & set(arr2))
return result
"See full answer
"\# Definition for a binary tree node.
class TreeNode:
def init(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def maxPathSum(self, root: TreeNode) -> int:
self.max_sum = float('-inf')"
Jerry O. - "\# Definition for a binary tree node.
class TreeNode:
def init(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def maxPathSum(self, root: TreeNode) -> int:
self.max_sum = float('-inf')"See full answer
"A few months ago I joined a micro-services platform engineering team as their manager, at that time my team was struggling to deliver towards an upcoming production deadline for a customer facing product. Production date had been moved 5 times already and there were about 40% of product features which were remaining to be tested and signed off to move to production . I was made responsible to deliver the release of this product within the deadline and turnaround the software delivery throughput."
Shuchi A. - "A few months ago I joined a micro-services platform engineering team as their manager, at that time my team was struggling to deliver towards an upcoming production deadline for a customer facing product. Production date had been moved 5 times already and there were about 40% of product features which were remaining to be tested and signed off to move to production . I was made responsible to deliver the release of this product within the deadline and turnaround the software delivery throughput."See full answer