"function knapsack(weights, values, cap) {
const indicesByValue = Object.keys(weights).map(weight => parseInt(weight));
indicesByValue.sort((a, b) => values[b]-values[a]);
const steps = new Map();
function knapsackStep(cap, sack) {
if (steps.has(sack)) {
return steps.get(sack);
}
let maxOutput = 0;
for (let index of indicesByValue) {
if (!sack.has(index) && weights[index] <= cap) {
maxOutput ="
Tiago R. - "function knapsack(weights, values, cap) {
const indicesByValue = Object.keys(weights).map(weight => parseInt(weight));
indicesByValue.sort((a, b) => values[b]-values[a]);
const steps = new Map();
function knapsackStep(cap, sack) {
if (steps.has(sack)) {
return steps.get(sack);
}
let maxOutput = 0;
for (let index of indicesByValue) {
if (!sack.has(index) && weights[index] <= cap) {
maxOutput ="See full answer
"Initially I asked clarifying questions like whether the tree can be empty or not and asked the interviewer to explain what is meant by left view and the explanation for the sample inputs.
Then I came up with the level order traversal approach where we visit each level in the binary tree at once using a queue and at each level print the value of the first node.
Interviewer seemed satisfied with the approach and asked me to code it up.
Finally gave the time and space complexity of the solution."
Ds S. - "Initially I asked clarifying questions like whether the tree can be empty or not and asked the interviewer to explain what is meant by left view and the explanation for the sample inputs.
Then I came up with the level order traversal approach where we visit each level in the binary tree at once using a queue and at each level print the value of the first node.
Interviewer seemed satisfied with the approach and asked me to code it up.
Finally gave the time and space complexity of the solution."See full answer
"Google VR mission - my understanding is to provide user an immersive experience where your room is the exploration ground/canvas and consumer has limitless possibilities
What i know about VR :
VR umbrella: Daydream and Cardboard
VR devices: Headset/Cardboard/Desktop/Mobile
VR product: Google Maps VR/ Carboard VR/Youtube VR/ TiltBrush/ Blocks
VR feature: High quality video/ low latency video?
Which product are we adding a new feature to? Tilt Brush
which device are we implementing the new feat"
Praniti S. - "Google VR mission - my understanding is to provide user an immersive experience where your room is the exploration ground/canvas and consumer has limitless possibilities
What i know about VR :
VR umbrella: Daydream and Cardboard
VR devices: Headset/Cardboard/Desktop/Mobile
VR product: Google Maps VR/ Carboard VR/Youtube VR/ TiltBrush/ Blocks
VR feature: High quality video/ low latency video?
Which product are we adding a new feature to? Tilt Brush
which device are we implementing the new feat"See full answer
"Personally i like the simple and user friendly interface of Adobe XD software. Which i have been using since last year and i am very comfortable with that. Nearly i didn't noticed any improvement in the software."
Anonymous Amphibian - "Personally i like the simple and user friendly interface of Adobe XD software. Which i have been using since last year and i am very comfortable with that. Nearly i didn't noticed any improvement in the software."See full answer
"The experience at a DMV can be improved by modernizing the systems, processes, and design of the service. Some possible ways to do this are:
Using digital technologies to enable online transactions, self-service kiosks, mobile apps, and chatbots. These can reduce the need for in-person visits, shorten wait times, and increase convenience and accessibility for customers. [For example, some states have implemented online driver’s license renewal, vehicle registration, and appointment schedul"
Anonymous Dove - "The experience at a DMV can be improved by modernizing the systems, processes, and design of the service. Some possible ways to do this are:
Using digital technologies to enable online transactions, self-service kiosks, mobile apps, and chatbots. These can reduce the need for in-person visits, shorten wait times, and increase convenience and accessibility for customers. [For example, some states have implemented online driver’s license renewal, vehicle registration, and appointment schedul"See full answer
"To scale web applications, one must concentrate on having
Shared hosting / Dedicated server
CDN (for images servers)
Caching techniques
Database Sharding
Adding/removing webservers on the fly
In order to improve the speed of the web applications, certain techniques to look at :
Web hosts - Shared hosting / dedicated server
CDN
Caching techniques
Compression techniques
Reduced use of plugins, check Java script / CSS files
Pre-fetch : If we are aware that th"
Googlepm 1. - "To scale web applications, one must concentrate on having
Shared hosting / Dedicated server
CDN (for images servers)
Caching techniques
Database Sharding
Adding/removing webservers on the fly
In order to improve the speed of the web applications, certain techniques to look at :
Web hosts - Shared hosting / dedicated server
CDN
Caching techniques
Compression techniques
Reduced use of plugins, check Java script / CSS files
Pre-fetch : If we are aware that th"See full answer
"We would like the interviewer to call out bad interviews too. I understand that these guest interviewees are spending their time for Exponent and are probably compensated. Exponent's customers are paying members and they need to know that bad answers are called out as bad answers and why. Telling everyone they are awesome at the end of the PM interview doesn't send the right message to paying subscribers who are spending valuable time training for interviews."
Aditya G. - "We would like the interviewer to call out bad interviews too. I understand that these guest interviewees are spending their time for Exponent and are probably compensated. Exponent's customers are paying members and they need to know that bad answers are called out as bad answers and why. Telling everyone they are awesome at the end of the PM interview doesn't send the right message to paying subscribers who are spending valuable time training for interviews."See full answer
"Clarification questions:
Is it correct to assume that I am an insurance company provide insurance coverage for Waymo? yes
Is it safe to assume that we are talking about self-driving cars (no drivers)? yes
Several factors are taken into consideration when insurance companies provide insurance quotes (please not that all of these will apply to self-driving cars):
M/F
Age
Years of driving experience
Driving record
Expected miles driven / year
Cost of vehicle
If car will be used for c"
GSWarriors - "Clarification questions:
Is it correct to assume that I am an insurance company provide insurance coverage for Waymo? yes
Is it safe to assume that we are talking about self-driving cars (no drivers)? yes
Several factors are taken into consideration when insurance companies provide insurance quotes (please not that all of these will apply to self-driving cars):
M/F
Age
Years of driving experience
Driving record
Expected miles driven / year
Cost of vehicle
If car will be used for c"See full answer
"This is another Diagnosis problem. To answer this question, we suggest you use our framework (along with the TROPIC method) to be as thorough as possible. The framework is as follows:
Ask clarifying questions
List potential high level reasons
Gather Context (TROPIC)Time
Region
Other features / products (internal)
Platform
Industry / Competition
Cannibalization
Establish a theory of probable cause
Test theories
Propose solutions
Summarize
"
Exponent - "This is another Diagnosis problem. To answer this question, we suggest you use our framework (along with the TROPIC method) to be as thorough as possible. The framework is as follows:
Ask clarifying questions
List potential high level reasons
Gather Context (TROPIC)Time
Region
Other features / products (internal)
Platform
Industry / Competition
Cannibalization
Establish a theory of probable cause
Test theories
Propose solutions
Summarize
"See full answer
"Clarifying questions like what is the end goal that we are trying to achieve ?
Is it revenue
Improving user experience
Improving current state - load times / find times / web page rendering / images ?
External API consideration
Introduction of a new feature in Google Maps
Branding related ?
Introducing a lite version of Google maps , say for emerging markets ?
Based on the above, calculate :
What are the positives of the algos ?
"
Googlepm 1. - "Clarifying questions like what is the end goal that we are trying to achieve ?
Is it revenue
Improving user experience
Improving current state - load times / find times / web page rendering / images ?
External API consideration
Introduction of a new feature in Google Maps
Branding related ?
Introducing a lite version of Google maps , say for emerging markets ?
Based on the above, calculate :
What are the positives of the algos ?
"See full answer
"I would structure my answer in the following way:
What's the situational context?
Mission of Uber
Making transportation easy by creating a platform for connecting drivers and riders
Key market trends: In top tier cities there are players in the food delivery market and the size of the pie is growing fast
What would feed into the decision-making?
The new platform should be able to connect customers and restaurants. The key things needed to make this platform success"
pmpractice - "I would structure my answer in the following way:
What's the situational context?
Mission of Uber
Making transportation easy by creating a platform for connecting drivers and riders
Key market trends: In top tier cities there are players in the food delivery market and the size of the pie is growing fast
What would feed into the decision-making?
The new platform should be able to connect customers and restaurants. The key things needed to make this platform success"See full answer
"Ask Follow up Questions
Is this for specific type of user or open?
Do we have any past research that has been done?
Do we have an idea of company and user goals?
Do we have metrics of success?
Are there any existing constraints?
Why | 5 min
Why is this product or feature important?
How does this product benefit customers?
What business opportunities does it create?
What is our hypothesis?
What are our company goals?
Who | 3 min
Who are the different types"
Ben G. - "Ask Follow up Questions
Is this for specific type of user or open?
Do we have any past research that has been done?
Do we have an idea of company and user goals?
Do we have metrics of success?
Are there any existing constraints?
Why | 5 min
Why is this product or feature important?
How does this product benefit customers?
What business opportunities does it create?
What is our hypothesis?
What are our company goals?
Who | 3 min
Who are the different types"See full answer
"Improve Swiggy’s Revenue
What time period? Improve to what extent?
Increasing Swiggy’s revenue in next one year (assume)
Any specific segment of Business?
Swiggy’s Mission Statement : To make food eating experience as comfortable, convenient & authentic.
Type of Business Swiggy is in
Food Delivery
Grocery Delivery - Instamart
Dining
Let’s Aim for one Business line say Food Delivery
lets breakdown the revenue maths for the business and see what we can do to improve revenue
F"
Meet P. - "Improve Swiggy’s Revenue
What time period? Improve to what extent?
Increasing Swiggy’s revenue in next one year (assume)
Any specific segment of Business?
Swiggy’s Mission Statement : To make food eating experience as comfortable, convenient & authentic.
Type of Business Swiggy is in
Food Delivery
Grocery Delivery - Instamart
Dining
Let’s Aim for one Business line say Food Delivery
lets breakdown the revenue maths for the business and see what we can do to improve revenue
F"See full answer
"Situation - I had 2 projects in hand. 1st - My primary project under my direct line manager, and 2nd - Under a dotted line manager.
I committed to my 2nd project based on my assumptions and planning of the primary project's scope & timelines. For both these projects, I was the key resource. Unfortunately, we got some new findings in my first project, and it happened to be a case where management made an overcommitment to our business without gauging the assumptions correctly. This put pressu"
DM - "Situation - I had 2 projects in hand. 1st - My primary project under my direct line manager, and 2nd - Under a dotted line manager.
I committed to my 2nd project based on my assumptions and planning of the primary project's scope & timelines. For both these projects, I was the key resource. Unfortunately, we got some new findings in my first project, and it happened to be a case where management made an overcommitment to our business without gauging the assumptions correctly. This put pressu"See full answer