"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
"For a mature product, I would do the following - Review the list of backlog items Meet with stakeholders and business owners to verify the relevance (are they still valid? esp. for new feature request) Break down the backlog list by a. Product improvements b. New features c. Operational Resiliency Do a 70-30 split with New features+Product Imp =70%, Resiliency =30% Prioritize by impact/scale and effort (team's capacity) by quarter Revisit Quarterly For a new product - Start"
Amishr - "For a mature product, I would do the following - Review the list of backlog items Meet with stakeholders and business owners to verify the relevance (are they still valid? esp. for new feature request) Break down the backlog list by a. Product improvements b. New features c. Operational Resiliency Do a 70-30 split with New features+Product Imp =70%, Resiliency =30% Prioritize by impact/scale and effort (team's capacity) by quarter Revisit Quarterly For a new product - Start"See full answer
"const mergeIntervals = (intervals) => { const compare = (a, b) => { if(a[0] b[0]) return 1 else if(a[0] === b[0]) { return a[1] - b[1] } } let current = [] const result = [] const sorted = intervals.sort(compare) for(let i = 0; i = b[0]) current[1] = b[1] els"
Kofi N. - "const mergeIntervals = (intervals) => { const compare = (a, b) => { if(a[0] b[0]) return 1 else if(a[0] === b[0]) { return a[1] - b[1] } } let current = [] const result = [] const sorted = intervals.sort(compare) for(let i = 0; i = b[0]) current[1] = b[1] els"See full answer
"Approach: 1) clarify and communicate baseline assumptions. 2) communicate how solving for this will align to FB's mission. 3) define the user groups we are solving for 4) Define the user journey pre/during/after natural disasters 4.a) pick a user group we want to go with 5) identify the painpoints for this user groups user journey 6) think about solutions 7) prioritize and elaborate 1) clarify and communicate baseline assumptions. Q: Can you tell me why FB is interesting in building"
dan - "Approach: 1) clarify and communicate baseline assumptions. 2) communicate how solving for this will align to FB's mission. 3) define the user groups we are solving for 4) Define the user journey pre/during/after natural disasters 4.a) pick a user group we want to go with 5) identify the painpoints for this user groups user journey 6) think about solutions 7) prioritize and elaborate 1) clarify and communicate baseline assumptions. Q: Can you tell me why FB is interesting in building"See full answer
"I would like to ask a few clarifying questions Lyft for kids: Does this mean we want to design a ride sharing app for kids? (Assuming yes) Do we have any existing features catered to kids? (Assuming no) Lyft has a lot of features. I am going to assume basic table stake features which Lyft already has as: Ability to call for a ride Ride tracking Are there any goals that we would like to achieve with this feature? If we look at current market conditions, Lyft has biggest threat f"
Unicorn 2. - "I would like to ask a few clarifying questions Lyft for kids: Does this mean we want to design a ride sharing app for kids? (Assuming yes) Do we have any existing features catered to kids? (Assuming no) Lyft has a lot of features. I am going to assume basic table stake features which Lyft already has as: Ability to call for a ride Ride tracking Are there any goals that we would like to achieve with this feature? If we look at current market conditions, Lyft has biggest threat f"See full answer
🧠Want an expert answer to a question? Saving questions lets us know what content to make next.
"Questions: Is "Facebook Search" referring to the overall search bar at the top where users can search across multiple facebook products (people, events, groups, marketplace, etc.) Interview (I): Assume it is for the overall search experience What's the current goal for Facebook as a company? How does Facebook search fit into the current company goal? I: Your call **What's the goal for this improvement for Facebook Search? Are we aiming to drive engagement overall?"
Mark - "Questions: Is "Facebook Search" referring to the overall search bar at the top where users can search across multiple facebook products (people, events, groups, marketplace, etc.) Interview (I): Assume it is for the overall search experience What's the current goal for Facebook as a company? How does Facebook search fit into the current company goal? I: Your call **What's the goal for this improvement for Facebook Search? Are we aiming to drive engagement overall?"See full answer
"I will interpret the question as "focus on the next 5 years". I will also give a high-level helicopter view since I’m supposed to imagine I’m CEO of Shopify. The mission of Shopify has always been to enable merchants and lessen the frictions in conducting commerce. Shopify is not an eCommerce company like Amazon, but a Tools and Infrastructure company like Stripe. Building tools and services for merchants are our core competencies. When we think about the main problems that Merchants have"
Shen A. - "I will interpret the question as "focus on the next 5 years". I will also give a high-level helicopter view since I’m supposed to imagine I’m CEO of Shopify. The mission of Shopify has always been to enable merchants and lessen the frictions in conducting commerce. Shopify is not an eCommerce company like Amazon, but a Tools and Infrastructure company like Stripe. Building tools and services for merchants are our core competencies. When we think about the main problems that Merchants have"See full answer
"Roadblocks or obstacles are common when working on projects. It's essential to navigate them and quickly find solutions to ensure timely delivery and success of your projects. Steps to handle roadblocks or obstacles: Gauge the potential imapct and decide if it's something that needs immediate solution or something that can be handled later. If it needs urgent solutions, try to understand the rootcause of the roadblock or obstacle and dig deep. If it's a already seen problem before, try"
Anonymous Stork - "Roadblocks or obstacles are common when working on projects. It's essential to navigate them and quickly find solutions to ensure timely delivery and success of your projects. Steps to handle roadblocks or obstacles: Gauge the potential imapct and decide if it's something that needs immediate solution or something that can be handled later. If it needs urgent solutions, try to understand the rootcause of the roadblock or obstacle and dig deep. If it's a already seen problem before, try"See full answer
"Assumptions: Part of the core FB product and not standalone app/ Education for children in 13-18 range Goal: To improve the education of children while building stronger social networks with their family/friends and thus further the mission of the company of bringing the world together and offering tools to form communities. Key user segments: Students (middle and high school) Teachers Parents For the purpose of this exercise, I would like to focus on the student user gr"
P K. - "Assumptions: Part of the core FB product and not standalone app/ Education for children in 13-18 range Goal: To improve the education of children while building stronger social networks with their family/friends and thus further the mission of the company of bringing the world together and offering tools to form communities. Key user segments: Students (middle and high school) Teachers Parents For the purpose of this exercise, I would like to focus on the student user gr"See full answer
"Define: What is the Verified Badge Product? The Meta verified badge is a product displayed alongside a verified user’s profile across all Meta platforms. Mission: Why Build the Verified Badge Product? Trust and Authenticity: Meta's primary reason for introducing a Verified Badge is to enhance trust and authenticity across the platform. By confirming the identities of key figures and influencers, Meta can assure users that their interactions are with genuine profiles, no"
realkimchi - "Define: What is the Verified Badge Product? The Meta verified badge is a product displayed alongside a verified user’s profile across all Meta platforms. Mission: Why Build the Verified Badge Product? Trust and Authenticity: Meta's primary reason for introducing a Verified Badge is to enhance trust and authenticity across the platform. By confirming the identities of key figures and influencers, Meta can assure users that their interactions are with genuine profiles, no"See full answer
"I'm going to assume I'm the PM for Events. Clarifying Questions: Is there any reason why we're improving Events, perhaps any bugs or feature requests? I'll assume improvement is open-ended Are we scoped to Facebook mobile or web? I'll assume no I'd like to break this problem down into three areas: goals, users, and solutions. Let's talk about goals first. Higher-level goal for Facebook & Events The higher-level goal for Facebook is to bring people closer together and empower"
Aryan B. - "I'm going to assume I'm the PM for Events. Clarifying Questions: Is there any reason why we're improving Events, perhaps any bugs or feature requests? I'll assume improvement is open-ended Are we scoped to Facebook mobile or web? I'll assume no I'd like to break this problem down into three areas: goals, users, and solutions. Let's talk about goals first. Higher-level goal for Facebook & Events The higher-level goal for Facebook is to bring people closer together and empower"See full answer
"I am assuming current situation where public transport have restarted but uber pool is yet to start. Assuming it's Bay Area = I am considering internet penetration to be 100% . pop = 8 million (2M per age group) age group that would use uber (20-80 , under 18s can't ride) x age group that can afford uber ( low:mid:high income = 20:50:30 meaning 80% of each qualifying age group can afford uber) x people per household in need of transportation (3 people per household, 2 cars on average per househ"
Ananya M. - "I am assuming current situation where public transport have restarted but uber pool is yet to start. Assuming it's Bay Area = I am considering internet penetration to be 100% . pop = 8 million (2M per age group) age group that would use uber (20-80 , under 18s can't ride) x age group that can afford uber ( low:mid:high income = 20:50:30 meaning 80% of each qualifying age group can afford uber) x people per household in need of transportation (3 people per household, 2 cars on average per househ"See full answer
"Goal/Vission of company Understanding of Whatsapp -> Whatsapp platform for people where they can connect with people remotely, they can chat with them, they can do a video call, they can send pdf, location, contacts, etc. Basically, clarify your understanding of WhatsApp. Whatsapp Goal -> connecting the people remotely in a hassle-free manner Vission 3-4 years down the line -> More engagement and retention of the users. For this vision what is the user's intended action Define"
Anonymous Muskox - "Goal/Vission of company Understanding of Whatsapp -> Whatsapp platform for people where they can connect with people remotely, they can chat with them, they can do a video call, they can send pdf, location, contacts, etc. Basically, clarify your understanding of WhatsApp. Whatsapp Goal -> connecting the people remotely in a hassle-free manner Vission 3-4 years down the line -> More engagement and retention of the users. For this vision what is the user's intended action Define"See full answer
"Payment system requirement assumption: Need to be ACID Amount limitation - some validation for max input size can be done at client level/ API level. Need to store historic info - GDPR The information to be stored for database assumed can be structured so RDBMS like mysql or Postgres Notification requirement - if fail or success need to be text or email to user and or caller Scalable - Assumption that it deals with critical transaction so Availability and Scalability requirement i"
Personal W. - "Payment system requirement assumption: Need to be ACID Amount limitation - some validation for max input size can be done at client level/ API level. Need to store historic info - GDPR The information to be stored for database assumed can be structured so RDBMS like mysql or Postgres Notification requirement - if fail or success need to be text or email to user and or caller Scalable - Assumption that it deals with critical transaction so Availability and Scalability requirement i"See full answer
"Came up with following strategy: take logs from user and send to LogService via API GW LogService takes the responsibility of generating time based SequenceId and persist the log in NoSQL (DDB) with key as SequenceId as primary key and timein_millis as sort (secondary) key. There are many system design tutorials on generating sequential sequence id where prefix is current time in epoch (milliseconds) Since there would be many LogService servers, spread across different availability zo"
Shahnawaz A. - "Came up with following strategy: take logs from user and send to LogService via API GW LogService takes the responsibility of generating time based SequenceId and persist the log in NoSQL (DDB) with key as SequenceId as primary key and timein_millis as sort (secondary) key. There are many system design tutorials on generating sequential sequence id where prefix is current time in epoch (milliseconds) Since there would be many LogService servers, spread across different availability zo"See full answer
"Clarifying questions Target market: parents Geo: USA Key value proposition: help people in parenting Target market assessment Reach: Every year, millions of people become parents and they need to take majority of decisions for their children till the child is 18. Frequency: The decision making and guidance is needed on almost every aspect of the child's life - so the frequency is high Importance: Making decision and managing children is one of the most important aspect of people"
Rahul J. - "Clarifying questions Target market: parents Geo: USA Key value proposition: help people in parenting Target market assessment Reach: Every year, millions of people become parents and they need to take majority of decisions for their children till the child is 18. Frequency: The decision making and guidance is needed on almost every aspect of the child's life - so the frequency is high Importance: Making decision and managing children is one of the most important aspect of people"See full answer
"My main task was to improve our recommendation system. I worked closely with the business and data teams to understand how recommendations were made in the past. After discussions, I found out that the system had fixed recommendations and didn't consider customer preferences. Our goal was to identify potential customers better, boost conversion rates with personalized recommendations, and increase cross-selling of products. After analyzing a lot of data, we focused on customers with accounts an"
R S. - "My main task was to improve our recommendation system. I worked closely with the business and data teams to understand how recommendations were made in the past. After discussions, I found out that the system had fixed recommendations and didn't consider customer preferences. Our goal was to identify potential customers better, boost conversion rates with personalized recommendations, and increase cross-selling of products. After analyzing a lot of data, we focused on customers with accounts an"See full answer
"Situation: Was given negative feedback about an aspect of my communications. The person said it made them worried because of the brevity and the format of some messages. (Their worry was that a longer negative message was coming) Task(s): Reflected on feedback about my communication style. Acknowledged the point. Assumed best intentions on the part of the person giving the feedback Saw things from the other person's point of view Action(s): In private - Apologised to the person wh"
Hans - "Situation: Was given negative feedback about an aspect of my communications. The person said it made them worried because of the brevity and the format of some messages. (Their worry was that a longer negative message was coming) Task(s): Reflected on feedback about my communication style. Acknowledged the point. Assumed best intentions on the part of the person giving the feedback Saw things from the other person's point of view Action(s): In private - Apologised to the person wh"See full answer
"I wish there were more real-life examples, more practical information that actually demonstrates the wealth of experience. In the beginning, we are introduced to 3 pillars: trust, high productivity, and growth mindset. It would have been nice to see 1 example for each of these pillars in practice. the interview response was very theoretical and diplomatic. Very shy in providing even small real-life examples e.g. question what are the example guidelines teams would set by themselves to identify w"
Anonymous Krill - "I wish there were more real-life examples, more practical information that actually demonstrates the wealth of experience. In the beginning, we are introduced to 3 pillars: trust, high productivity, and growth mindset. It would have been nice to see 1 example for each of these pillars in practice. the interview response was very theoretical and diplomatic. Very shy in providing even small real-life examples e.g. question what are the example guidelines teams would set by themselves to identify w"See full answer
" O(n) - characters in the string O(n) - stack def identify_adjacent(s: str, k: int) -> str: stack = [] n = len(s) for ch in s: if stack: topch, topcnt = stack[-1] if top_ch == ch: top_cnt += 1 stack[-1] = (ch, top_cnt) else: top_cnt = 1 stack.append((ch,1)) if top_cnt == k: stack.pop() else: stack.append"
Rick E. - " O(n) - characters in the string O(n) - stack def identify_adjacent(s: str, k: int) -> str: stack = [] n = len(s) for ch in s: if stack: topch, topcnt = stack[-1] if top_ch == ch: top_cnt += 1 stack[-1] = (ch, top_cnt) else: top_cnt = 1 stack.append((ch,1)) if top_cnt == k: stack.pop() else: stack.append"See full answer
Interviewed recently?
Help improve our question database (and earn karma) by telling us about your experience
+ Add your interview