Meta E5 phone screen experience

Posted
3 May 2025
318 reads

Summary

I cleared a Meta phone screen where I solved two data structure and algorithm problems, including implementing a custom data structure and 'Copy List with Random Pointer'.

How it went

Hello,

Cleared Meta phone screen. Giving back to the community.

Q1. Implement a class for interface DataStructure<T> with 4 methods -

  • contains(T t)
  • add(T t)
  • remove(T t)
  • listItemsInOrderOfInsertion()

All operations should be as efficient as possible.

Suggested the optimal solution would be to use a Map and Doubly linked list (similar to LRU Cache) but thought might take longer to code it so initially wrote normal list based container. Interviewer wanted optimal solution so ended up implementing the doubly linked list solution. Discussed TC and SC and dry ran some test cases.

Q2. OG Copy list with random pointer - https://leetcode.com/problems/copy-list-with-random-pointer. Implemented One pass solution to copy next and random pointer using Map<existingNode, cloneNode>. Dry ran test cases and found small bug missing null check in createCloneNode() method.

Recruiter reached out next day with positive feedback.

Questions asked (2)

  1. 01

    Implement Custom DataStructure with Efficient Operations

    Data Structures & Algorithms · Hard

    Implement a class for interface DataStructure<T> with 4 methods -

    • contains(T t)
    • add(T t)
    • remove(T t)
    • listItemsInOrderOfInsertion()

    All operations should be as efficient as possible.

  2. 02

    Copy List with Random Pointer

    Data Structures & Algorithms · Medium

    OG Copy list with random pointer.

    Open the problem

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Meta recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!