Meta | Menlo park Onsite | IC5

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-09-10Added By Anonymous
Source: Link

Company: Meta
Role: e5
Interview Stage: Onsite
Location: Menlo Park
Year: unknown

Original Post Content:

Hi,

I had phone screening round on August first week and got two questions and could solve optimally within time.
I was asked follow up k closest to improve - I told quick select option.

Most important thing they look for thought process
explain solution first brute force then optimal and may be most optimal
explain time complexity and space complexity
while coding again explain it loud
dry run with some example

Phone interview

1) check if give string is palindrome with condition one letter can be ignored
https://leetcode.com/problems/valid-palindrome-ii/description/?envType=company&envId=facebook&favoriteSlug=facebook-thirty-days

2) k closest
https://leetcode.com/problems/k-closest-points-to-origin/description/?envType=company&envId=facebook&favoriteSlug=facebook-thirty-days

Onsite round

Round 1 - I could solve first one optimally and second one I could solve using heap but that is not optimal

a) Given a list of k sorted lists, with total n elements. Implement an iterator on this data structure. Basically, I was asked to implement hasNext() and next() methods on the list of list so that next() would always return the next minimum value in the whole dataset.

Example -
{ {1, 9, 10}
{4, 7}
{2}
}
Each next() will return - {1, 2, 4, 7, 9, 10} - in this order.

b) Given 2 array with costs between 2 cities(a -> b and b-> a), return the min round trip cost between 2 cities.

Round 2 - I could solve first optimally and second I tried solving using word ladder 1 approach that is not correct way

https://leetcode.com/problems/buildings-with-an-ocean-view/description/

https://leetcode.com/problems/word-ladder-ii/description/

For this problem they were expecting only one solution not all possible combination

Round 3 - behavorial

Tell me about time when your colleague disagreed with you
Tell me about time when did some POC and but product decided to drop it
Tell me about the experiment project or POC you worked on

Round 4 - Product design Auction on Instagram

I did ok, could not answer scablilty and cost analysis

Reference :
https://www.youtube.com/watch?v=3aX-lC5_P1M&t=1491s
https://leetcode.com/discuss/interview-question/system-design/1490937/bidding-auction-system-design
Check on chat GPT

I feel chat GPT solution was better

Feedback from recruiter:

1. I did not give complete and optimal coding solution
2. System design - did not explain in detail scability and cost analysis for SSE
3. Behavioral was ok

Comments