"public static void sortBinaryArray(int[] array) {
int len = array.length;
int[] res = new int[len];
int r=len-1;
for (int value : array) {
if(value==1){
res[r]= 1;
r--;
}
}
System.out.println(Arrays.toString(res));
}
`"
Nitin P. - "public static void sortBinaryArray(int[] array) {
int len = array.length;
int[] res = new int[len];
int r=len-1;
for (int value : array) {
if(value==1){
res[r]= 1;
r--;
}
}
System.out.println(Arrays.toString(res));
}
`"See full answer
"As a project or program manager to influence effectively without direct authority, focus on building credibility and trust by consistently delivering results, demonstrating empathy for stakeholder needs, and aligning everyone on shared goals. When managing up, tailor communication to leadership’s priorities and concerns—bring actionable insights, clear data, and potential solutions to the table. When managing down, empower teams by promoting ownership, offering timely recognition, and maintainin"
Elle - "As a project or program manager to influence effectively without direct authority, focus on building credibility and trust by consistently delivering results, demonstrating empathy for stakeholder needs, and aligning everyone on shared goals. When managing up, tailor communication to leadership’s priorities and concerns—bring actionable insights, clear data, and potential solutions to the table. When managing down, empower teams by promoting ownership, offering timely recognition, and maintainin"See full answer
"CQs
Is 10x capacity any specific time or in general
Any time of the day , store should be able to handle
To confirm, Grocery store objective is to sell day to day grocery and vegetables? Or do we want to include any other products
Day to day grocery
Why is the foot traffic more than 10x the typical cap. Was the store designed poorly or did the store not predict the foot traffic correctly ?
We suddenly become local's favorite
We want to design this single store to handle 10X capacity an"
Abhi S. - "CQs
Is 10x capacity any specific time or in general
Any time of the day , store should be able to handle
To confirm, Grocery store objective is to sell day to day grocery and vegetables? Or do we want to include any other products
Day to day grocery
Why is the foot traffic more than 10x the typical cap. Was the store designed poorly or did the store not predict the foot traffic correctly ?
We suddenly become local's favorite
We want to design this single store to handle 10X capacity an"See full answer
"Use an index, two pointers, and a set to keep track of elements that you've seen.
pseudo code follows:
for i, elem in enumerate(array):
if elem in set return False
if i > N:
set.remove(array[i-N])"
Michael B. - "Use an index, two pointers, and a set to keep track of elements that you've seen.
pseudo code follows:
for i, elem in enumerate(array):
if elem in set return False
if i > N:
set.remove(array[i-N])"See full answer
"Estimate the market size for Google Fi
Market size -> total revenue/sales in a market = market share
Google Fi -> telecommunication services by google. Only for US market
Market size = (1)google fi customers / (2)total customers in the market
(2)total customers in the market
300m ppl in the US
0-90 life expectancy
Factor out 0-12,80-90
240m ~250m ppl in the US who are using phones and need a telecommunication service
(1)google fi customers
Version 40% - 110m
AT&T 30% - 70m
T-Mobil"
Cameron P. - "Estimate the market size for Google Fi
Market size -> total revenue/sales in a market = market share
Google Fi -> telecommunication services by google. Only for US market
Market size = (1)google fi customers / (2)total customers in the market
(2)total customers in the market
300m ppl in the US
0-90 life expectancy
Factor out 0-12,80-90
240m ~250m ppl in the US who are using phones and need a telecommunication service
(1)google fi customers
Version 40% - 110m
AT&T 30% - 70m
T-Mobil"See full answer
"
O(n) Time complexity
O(n) Space - Freqency Map
from typing import List
from collections import Counter
def least_interval(tasks: List[str], n: int) -> int:
freqCount = Counter(tasks)
maxFreq = max(freqCount.values())
numWithMax = sum(1 if v == maxFreq else 0 for v in freqCount.values())
coolDown = n
time = (maxFreq - 1) * (coolDown + 1) + numWithMax
return max(len(tasks), time)
debug your code below
print(least_interval(['A', 'A', 'B'], 2))
`"
Rick E. - "
O(n) Time complexity
O(n) Space - Freqency Map
from typing import List
from collections import Counter
def least_interval(tasks: List[str], n: int) -> int:
freqCount = Counter(tasks)
maxFreq = max(freqCount.values())
numWithMax = sum(1 if v == maxFreq else 0 for v in freqCount.values())
coolDown = n
time = (maxFreq - 1) * (coolDown + 1) + numWithMax
return max(len(tasks), time)
debug your code below
print(least_interval(['A', 'A', 'B'], 2))
`"See full answer
"Here are some strategies to mitigate the effects of organizational and architectural dependencies on a team's work.
Automation
Where possible, automate repetitive tasks, and include appropriate controls to ensure safety. For example, automate deployments, building in all needed safety and compliance checks, and let teams perform the process themselves, rather than having them back up in the Ops team’s queue.
Standardize processes
Even if you can’t automate a process, make it happen the s"
Mukul P. - "Here are some strategies to mitigate the effects of organizational and architectural dependencies on a team's work.
Automation
Where possible, automate repetitive tasks, and include appropriate controls to ensure safety. For example, automate deployments, building in all needed safety and compliance checks, and let teams perform the process themselves, rather than having them back up in the Ops team’s queue.
Standardize processes
Even if you can’t automate a process, make it happen the s"See full answer
"clarifying questions
why are we building this? is there a particular reason we are building this or is there a metric/group of metrics that shall be activated that eventually drives an organisational metric or is it just an attempt of creating another super app?
am i safe to assume that i am a part of the team that can actually drive the marketplace experience? and by shopping, we mean a marketplace like an amazon?
can i safely set the overarching organisational goal, then the indi"
Arnab S. - "clarifying questions
why are we building this? is there a particular reason we are building this or is there a metric/group of metrics that shall be activated that eventually drives an organisational metric or is it just an attempt of creating another super app?
am i safe to assume that i am a part of the team that can actually drive the marketplace experience? and by shopping, we mean a marketplace like an amazon?
can i safely set the overarching organisational goal, then the indi"See full answer
"As always, I'd start this discussion by asking a couple clarifying questions. In particular, I'd like to learn more from the interviewer about what "not pulling as hard" looks like. Does it mean:
lower code output relative to the rest of the team
lower velocity per sprint in terms of story points
less participation in code reviews
minimal participation in meetings and ceremonies
Or perhaps it's a combination of these. As others have pointed out, I'd also want to confirm that I am not ma"
Seth W. - "As always, I'd start this discussion by asking a couple clarifying questions. In particular, I'd like to learn more from the interviewer about what "not pulling as hard" looks like. Does it mean:
lower code output relative to the rest of the team
lower velocity per sprint in terms of story points
less participation in code reviews
minimal participation in meetings and ceremonies
Or perhaps it's a combination of these. As others have pointed out, I'd also want to confirm that I am not ma"See full answer
"Hangouts 100k feedback gave 3* rating, in 2013. What to do next
Clarify:
Solving for 2013, should disregard changes made (Allo, Gchat, Gmeet) since then? [yes]
Is this on any specific platform - App Store or Play store? [both]
Consumer or Enterprise [consumer]
Problem framing - - - - - - - - - - - - -
Mission: org world info., be helpful. Hangouts role in this mission to help users stay connected, exchange info and content (via messages and calls)
Biz/ Prod goals
Growth/ acq
Install ba"
Calyan - "Hangouts 100k feedback gave 3* rating, in 2013. What to do next
Clarify:
Solving for 2013, should disregard changes made (Allo, Gchat, Gmeet) since then? [yes]
Is this on any specific platform - App Store or Play store? [both]
Consumer or Enterprise [consumer]
Problem framing - - - - - - - - - - - - -
Mission: org world info., be helpful. Hangouts role in this mission to help users stay connected, exchange info and content (via messages and calls)
Biz/ Prod goals
Growth/ acq
Install ba"See full answer
"I told a story about having good intentions to help out a superior with a problem but I did so without seeking buy-in (permission) first. While I did solve the problem and provided value to him and my other colleagues, I was reprimanded for crossing boundaries and not respecting his privacy (I accessed his computer without his permission to deliver a resolution to a problem).
While I had good intentions and the outcome was good, my approach left me with a negative mark and a life long lesson r"
Zakery K. - "I told a story about having good intentions to help out a superior with a problem but I did so without seeking buy-in (permission) first. While I did solve the problem and provided value to him and my other colleagues, I was reprimanded for crossing boundaries and not respecting his privacy (I accessed his computer without his permission to deliver a resolution to a problem).
While I had good intentions and the outcome was good, my approach left me with a negative mark and a life long lesson r"See full answer
"You are given a string S and a number K as input, and your task is to print S to console output considering that, at most, you can print K characters per line.
Example:
S = "abracadabra sample"
K = 11
Output:
abracadabra
sample
Note that this problem requires the interviewee gather extra requirements from the interviewer (e.g. do we care about multiple white spaces? what if the length of a word is greater than K, ...)"
B. T. - "You are given a string S and a number K as input, and your task is to print S to console output considering that, at most, you can print K characters per line.
Example:
S = "abracadabra sample"
K = 11
Output:
abracadabra
sample
Note that this problem requires the interviewee gather extra requirements from the interviewer (e.g. do we care about multiple white spaces? what if the length of a word is greater than K, ...)"See full answer
"Providing some bullets to expand on to respond to this question-
Inability to adapt to the changes in customer's needs in retail industry
Lack of competitive analysis
Rigid business model
Lack of well defined Vision and Strategy"
Rahul P. - "Providing some bullets to expand on to respond to this question-
Inability to adapt to the changes in customer's needs in retail industry
Lack of competitive analysis
Rigid business model
Lack of well defined Vision and Strategy"See full answer
"Clarifying question - Who are we? Any constraints - time/money? What region are we going to focus on? Do we have a goal in mind? I'm assuming a product like this does not exist in today's world. How do you define kids - any specific age range?
User Segments -
1) Beginner - don't know what an ATM is/don't understand money that well
2) Intermediate - have a basic understanding of ATMs
3) Advanced - have a really good understanding - maybe are on the older side
Segment chosen is the Intermediate"
Mrinalini A. - "Clarifying question - Who are we? Any constraints - time/money? What region are we going to focus on? Do we have a goal in mind? I'm assuming a product like this does not exist in today's world. How do you define kids - any specific age range?
User Segments -
1) Beginner - don't know what an ATM is/don't understand money that well
2) Intermediate - have a basic understanding of ATMs
3) Advanced - have a really good understanding - maybe are on the older side
Segment chosen is the Intermediate"See full answer