Netflix · Senior Software Engineer, Frontend (10 years)
Rounds
- Phone screen
Questions asked
- Given a JSON object (a family tree), print the people names. Simple DFS.
Example input:
Output:{"parentName": "sanhua", "children": [{"parentName": "xianluo"},{"parentName": "lihua", "children": [...]}, ...]}["sanhua", "xianluo", ...] - Create your own Jest. Implement a few methods to make this work:
expect(add(2, 2)).toBe(greaterThan(3)) - getVideosWithLikes (Promise orchestration):
You have two unstable APIs (getVideos,getVideosLikes). One is critical (Videos), one is “nice-to-have” (Likes). IfgetVideosfails, the whole app fails. IfgetVideosLikesfails, you must still show the videos with null or 0 likes. Solution: just wrapgetVideosLikeswith try/catch.
Tips
- For the DFS tree traversal, practice recursion and handling nested objects.
- For the promise orchestration, Promise Deadline Guard on FrontendLead is similar.
