Meta Screening E5

Posted
19 May 2025
289 reads

Summary

I had my screening interview at Meta, during which I was asked two specific LeetCode problems: Kth Largest Element in an Array and a variation of Binary Tree Vertical Order Traversal.

How it went

I had my screening interview at Meta. The following questions were asked:

  1. https://leetcode.com/problems/kth-largest-element-in-an-array/description/
  2. https://leetcode.com/problems/binary-tree-vertical-order-traversal/description/ or https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/description/ with no specific order mentioned for the colliding elements (elements in the same row and column)

For the second question, when I mentioned BFS traversal, the interviewer asked why I couldn't use DFS and requested an example to prove it.

Questions asked (2)

  1. 01

    Kth Largest Element in an Array

    Data Structures & Algorithms · Medium

    Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted order, not the kth distinct element. The problem expects a solution with O(n) time complexity.

    Open the problem
  2. 02

    Binary Tree Vertical Order Traversal

    Data Structures & Algorithms · Medium

    Given the root of a binary tree, return the vertical order traversal of its nodes' values (i.e., from top to bottom, column by column). The specific variant discussed did not mention a specific order for colliding elements (elements in the same row and column). I was also asked to explain why BFS traversal might be preferred over DFS for this problem and to provide an example to prove it.

    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!