Meta Phonescreen

Posted
13 Aug 2025
343 reads

Summary

I had a phone interview at Meta where I successfully solved two data structure and algorithm problems, and I am currently awaiting a reply.

How it went

Had a phone interview 1.https://leetcode.com/problems/swap-nodes-in-pairs/description/ 2.https://leetcode.com/problems/insert-delete-getrandom-o1/

I was able to solve both questions awaiting for reply

Hope this helps for other users

Questions asked (2)

  1. 01

    Swap Nodes in Pairs

    Data Structures & Algorithms · Medium

    Given a head of a linked list, swap every two adjacent nodes and return its head. I must solve the problem without modifying the values in the list's nodes (i.e., only nodes themselves may be changed).

    Open the problem
  2. 02

    Insert Delete GetRandom O(1)

    Data Structures & Algorithms · Medium

    Implement the RandomizedSet class:

    • RandomizedSet() Initializes the RandomizedSet object.
    • bool insert(int val) Inserts an item val into the set if not present. Returns true if the item was not present, false otherwise.
    • bool remove(int val) Removes an item val from the set if present. Returns true if the item was present, false otherwise.
    • int getRandom() Returns a random element from the current set of elements (at least one element must exist when this method is called). Each element must have the same probability of being returned. I must implement the functions of the class such that each function works in average O(1) time complexity.
    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!