Leave your Email to get the latest Meta interview questions weekly.
We'll never share your email with anyone else.
No spam we promise.
Design instagram auction system, both static and live...
Design Online Chess Game...
Special preparation and strategy for the team match round...
How to use Queues in your system?
Design a chat app like FB Messenger/Whatsapp/Slack and search the chat history by keywords…
Design a scalable weather data service for your customers...
Design a version control system like GitHub…
Design the smart lock system...
Given a 0-1 matrix, where 1 means block, 0 means road, return the number of paths from row one to row bottom...
Think about ads platform like Google/Meta. There are billions of ads clicks per day. Now we need to design a dashboard to visualize the ads performance. More specifically, you need to implement a service to return the number of ads clicks within a certain time frame...
Given an API reads 1 char at a time from a file, check if two files are identical...
Given a matrix and an integer k, return the maximum sum of all the k x k matrices
Given a list of lowercase letters, find whether the letters can make a palindromic string...
Given a binary matrix where 1 denotes land and 0 denotes water, return the number of border tiles...
Given a binary tree, find the max difference between an ancestor and its descendant...
Given the absolution path to a folder in Unix, convert it to the canonical path...
A 10 x 10 board is filled with randomly placed gems. A match occurs when 3 or more gems of the same color line up in a row either horizontally or vertically...
Given a string S and a list of key terms, return a string with the key terms surrounded by tags...
Given an array of numbers, remove the increasing sequences until there is no change.
...
[Facebook Onsite Question] Sort String By Custom Alphabetical Order
[Facebook Onsite Question] Task Scheduler II
Given an array of numbers [1, 2, 3, 1, 4, 2, ..... ]. (Notice there could be duplicate) Also given an integer N, which means two same numbers must be N space away.
You are going to write a program to find out a way to padding zeros to these numbers with the minimum total length...
# There's a room with a TV and people are coming in and out to watch it. The TV is on only when there's at least a person in the room.
# For each person that comes in, we record the start and end time. We want to know for how long the TV has been on. In other words:
# Given a list of arrays of time intervals, write a function that calculates the total amount of time covered by the intervals.
# For example:
# input = [(1,4), (2,3)]
# > 3
# input = [(4,6), (1,2)]
# > 3
# input = {{1,4}, {6,8}, {2,4}, {7,9}, {10, 15}}
# > 11
Google On-site 2018 Winter
There are orbs on an NxM board ('O' denotes orb. 'X' denotes empty slot).
Whenever two orbs are in the same column or the same row, you get to erase one of them.
Try to erase as many orbs as possible.
Find the minimum number of orbs remained on board eventually.
How to randomly select a number in an array?
array: [15, 2, 4, 5, 1, -2, 0]
Follow-up:
Given a second array freq where freq[i] represents the occurrence of the ith number in array, how to randomly select a number in array based on the frequency.
Extra requirement:
Could you complete the selection in a single-pass(go through each array only once)?
Implement a ring buffer
Give a binary tree, find if it's possible to cut the tree into two halves of equal sum. You can only cut one edge.
Given a Binary Search Tree (BST) with root node root, and a target value V, split the tree into two subtrees where one subtree has nodes that are all smaller or equal to the target value, while the other subtree has all nodes that are greater than the target value. It's not necessarily the case that the tree contains a node with value V.
In the array {1, 6, 3, 5, 9, 7}, the longest arithmetic sequence is 1, 3, 5, and 7