Meta/Facebook Phone Screen | E4 | London | Feb 2022

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-02-13Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e4
Interview Stage: Phone Screen
Location: London
Year: 2022

Original Post Content:

YOE: 3+
Work experience: Semicondcutor based MNC in India

2 Questions were asked

1. Given source and target strings, return true if it is possible to make target string from source string.
2. Given a list of file paths in the filesystem e.g. "/home/usr", "/usr/bin", "/root" ... print the entire hierarchy like a tree

For the first question I was able to come up with the solution after discussing all trivial and edge cases.
For the second question I explained the approach of using DFS but couldn't complete the code. Furthermore he asked if there was even a better way to solve this problem. I gave him an example using Trie data structure.
Same question can be found here
https://leetcode.com/discuss/interview-experience/1379020/Google-phone-screen

Update:
Moved to Onsite

Comments