"Question: An array of n integers is given, and a positive integer k, where k << n. k indicates that the absolute difference between each element's current index (icurrent) and the index in the sorted array (isorted) is less than k (|icurr - isorted| < k).
Sort the given array.
The most common solution is with a Heap:
def solution(arr, k):
min_heap = []
result = []
for i in range(len(arr))
heapq.heappush(min_heap, arr[i])
"
Guilherme M. - "Question: An array of n integers is given, and a positive integer k, where k << n. k indicates that the absolute difference between each element's current index (icurrent) and the index in the sorted array (isorted) is less than k (|icurr - isorted| < k).
Sort the given array.
The most common solution is with a Heap:
def solution(arr, k):
min_heap = []
result = []
for i in range(len(arr))
heapq.heappush(min_heap, arr[i])
"See full answer
"Goal:
Maps should reflect reality of places especially with places like hospitals
Ecosystem :
Maps User Usecases:
Daily Commute
Explore places
Critical situations like emergency - hospital visits, work emergencies, family
Businesses using Google Business Profile:
Medical & Health
Hospitals
Clinics
Gyms
Restaurants
Salons
Mom & Pop stores, SMB - Retail
Enterprises
These can be online, physical or both
Local guides
Downstream usecases for other google products:
Google Search
Google Gemini
"
Pooja G. - "Goal:
Maps should reflect reality of places especially with places like hospitals
Ecosystem :
Maps User Usecases:
Daily Commute
Explore places
Critical situations like emergency - hospital visits, work emergencies, family
Businesses using Google Business Profile:
Medical & Health
Hospitals
Clinics
Gyms
Restaurants
Salons
Mom & Pop stores, SMB - Retail
Enterprises
These can be online, physical or both
Local guides
Downstream usecases for other google products:
Google Search
Google Gemini
"See full answer
"Form what I know I would state the following two points:
Only 20% of google's $180B revenue comes from non-ad revenue sources. Google Cloud is a big part of Google's revenue diversification efforts. Google cloud at $13B is still under 10% of total revenue.
Google cloud is at position 3 compared after Amazon AWS and Microsoft Azure. Typically only top 2 platforms take majority of stake in a lot of businesses.
Google Cloud's Goal: Become one of the top two Cloud platforms in the world by deep"
Venkateswara reddy K. - "Form what I know I would state the following two points:
Only 20% of google's $180B revenue comes from non-ad revenue sources. Google Cloud is a big part of Google's revenue diversification efforts. Google cloud at $13B is still under 10% of total revenue.
Google cloud is at position 3 compared after Amazon AWS and Microsoft Azure. Typically only top 2 platforms take majority of stake in a lot of businesses.
Google Cloud's Goal: Become one of the top two Cloud platforms in the world by deep"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
"I would start off by talking about the goals of this feature.
What's the goal of Instagram with blue check marks? What does it aim to achieve? For the purpose of this question, I am assuming that Instagram wants to verify celebrities/famous people/brands as the original profile that differentiates them from fake profiles or other fan groups. It's also to develop trust and credibility amongst Instagram users.
The mission of Facebook is to connect people across the globe. Instagram, which is a p"
Anonymous Shrimp - "I would start off by talking about the goals of this feature.
What's the goal of Instagram with blue check marks? What does it aim to achieve? For the purpose of this question, I am assuming that Instagram wants to verify celebrities/famous people/brands as the original profile that differentiates them from fake profiles or other fan groups. It's also to develop trust and credibility amongst Instagram users.
The mission of Facebook is to connect people across the globe. Instagram, which is a p"See full answer
Analytical
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.
"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
"I'd start by clarifying the purpose of the in-flight experience.
Get more travelers? (adoption)
Reduce customer churn? (retention)
Gain additional revenue? (revenue)
Lets say we want to offer an in-flight experience that drives revenue.
It is intuitive that, customer expectations for an in-flight experience will vary based on the duration of the flights:
Short haul flights (1 hour or less): Self-help options are better suited. While seating may be important, a slight inconvenience for"
Atit P. - "I'd start by clarifying the purpose of the in-flight experience.
Get more travelers? (adoption)
Reduce customer churn? (retention)
Gain additional revenue? (revenue)
Lets say we want to offer an in-flight experience that drives revenue.
It is intuitive that, customer expectations for an in-flight experience will vary based on the duration of the flights:
Short haul flights (1 hour or less): Self-help options are better suited. While seating may be important, a slight inconvenience for"See full answer
"It's fair to assume a tech lead is an experienced person, especially in bigger organizations like Google. How we shape our thought process is part of our past experiences of default nature.
I will first give it some time before I react/respond. I will try to understand the pattern where the tech lead is being devil's advocate. Eg. If he is being negative about PRD everytime, that means he had past experiences where the PRD was incomplete or scope was change;
if is negative about testing scena"
Dewansh Z. - "It's fair to assume a tech lead is an experienced person, especially in bigger organizations like Google. How we shape our thought process is part of our past experiences of default nature.
I will first give it some time before I react/respond. I will try to understand the pattern where the tech lead is being devil's advocate. Eg. If he is being negative about PRD everytime, that means he had past experiences where the PRD was incomplete or scope was change;
if is negative about testing scena"See full answer
"To describe designing a complex system architecture, an AI would outline its analytical, iterative, and constraint-driven approach, highlighting principles like microservices, scalability, and security. An AI's process would be based on patterns learned from vast datasets of successful architectural designs, focusing on adaptability for different applications.
Here is a breakdown of an AI's approach to designing a complex system, followed by a hypothetical example based on its internal knowledge"
Teja G. - "To describe designing a complex system architecture, an AI would outline its analytical, iterative, and constraint-driven approach, highlighting principles like microservices, scalability, and security. An AI's process would be based on patterns learned from vast datasets of successful architectural designs, focusing on adaptability for different applications.
Here is a breakdown of an AI's approach to designing a complex system, followed by a hypothetical example based on its internal knowledge"See full answer
"
why do we want to improve the DMV? we’re a startup and we want to improve the experience at the DMV
what is the DMV? my assumption is that this is for the US only, and is the department of motor vehicles. and this is where folks go to get IDs, register their cars, etc. is that correct or am I missing anything about what the DMV is?
is there a timeframe to launch?
are there any other constraints that I should be aware of?
context:
what is the DMV - the DMV is a something of a"
Elle Z. - "
why do we want to improve the DMV? we’re a startup and we want to improve the experience at the DMV
what is the DMV? my assumption is that this is for the US only, and is the department of motor vehicles. and this is where folks go to get IDs, register their cars, etc. is that correct or am I missing anything about what the DMV is?
is there a timeframe to launch?
are there any other constraints that I should be aware of?
context:
what is the DMV - the DMV is a something of a"See full answer
"Problem Understanding
Is it within FB applications? > Yes
FB Date has one on one matching. Can I consider extending existing capability?
After matching, are we considering interactions within FB as well?
FB mission is to give people power to connect build community and bring the world closer. Building connection through content engagement is the core of the FB product. With increased demand on learning online and velocity of acquiring new skills required to find a job or sustain in"
Soodong P. - "Problem Understanding
Is it within FB applications? > Yes
FB Date has one on one matching. Can I consider extending existing capability?
After matching, are we considering interactions within FB as well?
FB mission is to give people power to connect build community and bring the world closer. Building connection through content engagement is the core of the FB product. With increased demand on learning online and velocity of acquiring new skills required to find a job or sustain in"See full answer
"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
"For larger audience of the platform, Flipkart is an e-commerce website like Amazon in India.
Gather more information
15% decline in comparison to last week, last month, last quarter or last year or across a particular sale duration that runs at a fixed frequency like Big Billion Days (similar to Great Indian Festival which Amazon puts up)
Across a particular item, category, brand or overall.
From which flow like Wishlist to cart, Product detail page to cart, Product comparison to c"
Shubham K. - "For larger audience of the platform, Flipkart is an e-commerce website like Amazon in India.
Gather more information
15% decline in comparison to last week, last month, last quarter or last year or across a particular sale duration that runs at a fixed frequency like Big Billion Days (similar to Great Indian Festival which Amazon puts up)
Across a particular item, category, brand or overall.
From which flow like Wishlist to cart, Product detail page to cart, Product comparison to c"See full answer
"Clarifying questions: what exactly do we mean by travel product?
Travel recommendation.
Travel bookings( airlines/hotels)
Itinerary planning etc.
Is it going to be a completely new digital product or an extension of instagram?
Assuming travel product here means recommendations/bookings, and it going to be an extension within instagram, lets dwell further:
Meta's vision: To make the world a closer place by offering connections; build communities.
Instagram's mission: To capture , c"
Anonymous Boa - "Clarifying questions: what exactly do we mean by travel product?
Travel recommendation.
Travel bookings( airlines/hotels)
Itinerary planning etc.
Is it going to be a completely new digital product or an extension of instagram?
Assuming travel product here means recommendations/bookings, and it going to be an extension within instagram, lets dwell further:
Meta's vision: To make the world a closer place by offering connections; build communities.
Instagram's mission: To capture , c"See full answer
"Clarifying Questions
Candidate : What is the objective we want to achieve?
Interviewer : Enhance User Experience, User Engagement and add value
Candidate : What platform are we looking at Mobile App or Desktop?
Interviewer : Platform independent
Candidate : Have we conducted any product discovery experiments at this point?
Interviewer : Not yet
Candidate : Can we assume the new features will cater to all professionals across different industries?
Interviewer : Yes
Candidate : A"
Sneha S. - "Clarifying Questions
Candidate : What is the objective we want to achieve?
Interviewer : Enhance User Experience, User Engagement and add value
Candidate : What platform are we looking at Mobile App or Desktop?
Interviewer : Platform independent
Candidate : Have we conducted any product discovery experiments at this point?
Interviewer : Not yet
Candidate : Can we assume the new features will cater to all professionals across different industries?
Interviewer : Yes
Candidate : A"See full answer