Meta Phone Screen Interview
- Posted
- 5 Apr 2025
Summary
I had a phone screen interview at Meta for an E4 Infra role, which included a LeetCode problem and a custom problem about finding the minimum cost for a round trip between two cities with time-sequenced flight costs.
How it went
Appeared for Meta E4 Infra phone screen interview this week.
Questions:
- Valid Word Abbreviation
- Written Below:
Plan a round trip between 2 cities with minimum flight cost From departure city to destination city, the fees are stored in array D[] From destination city to departure city, the fees are stored in array R[]
D: [10, 8, 9, 11, 7] R: [8, 8, 10, 7, 9]
The minimum cost will be D[1] + R[3] = 15
EDIT: Yes, lists are time sequenced, according to my interviewer. Meaning, D[0] corresponds to Day #1, then Day[1] corresponds to Day #2, etc. And, the return trip can NOT be taken BEFORE the 1st trip. However, the return trip CAN be taken on the same day as the 1st trip.
Questions asked (2)
- 01
Valid Word Abbreviation
Data Structures & Algorithms · Medium
Open the problemGiven a word and an abbreviation, determine if the word matches the abbreviation. An abbreviation can be formed by replacing a non-empty substring of a word with its length.
- 02
Minimum Round Trip Flight Cost
Data Structures & Algorithms · Medium
Plan a round trip between two cities with minimum flight cost. From departure city to destination city, fees are stored in array D[]. From destination city to departure city, fees are stored in array R[]. Both D and R arrays are time-sequenced, where D[0] corresponds to Day #1, D[1] to Day #2, etc. The return trip cannot be taken before the first trip, but can be taken on the same day. Example: D: [10, 8, 9, 11, 7], R: [8, 8, 10, 7, 9]. The minimum cost will be D[1] + R[3] = 15.