Meta(前 Facebook)一直是全球技术岗竞争最激烈的公司之一。无论是 Software Engineer、New Grad 还是 Intern 岗位,Meta OA 几乎都是候选人进入后续面试流程的第一道门槛。
很多人刷了大量题,但真正参加 Meta OA 时依然会感觉时间紧、题目熟悉却写不完,甚至在边界条件上失分。本文结合近一年真实 Meta OA 反馈,对 OA 形式、真题类型以及有效准备方式做一次系统整理。
Meta OA 概览
Meta OA 通常是一场限时在线编程测试,用于快速筛选候选人的算法基础和工程思维。
常见特征包括:
- 测试时间一般在 70 到 90 分钟之间
- 题目数量通常为 2 到 3 题
- 支持多种主流编程语言,如 Python、Java、C++ 等
- 大多数情况下无法频繁运行代码,依赖逻辑推演和一次性提交
OA 的重点不只是写出能跑的代码,而是考察候选人在有限时间内,是否能选对解题方向,并写出结构清晰、边界完整的实现。
Meta OA 真题还原
以下题目来自近一年 ProgramHelp 辅导过的多位 Meta SDE / NG / Intern 候选人的 真实 OA 反馈汇总。
Question 1
You are analyzing network traffic logs to identify potential security threats. A specific type of threat is indicated by a sequence of packet sizes that form a geometric progression with a given common ratio.
Given an array of integers packetSizes representing the sizes of packets captured in a network session and an integer r, count the number of contiguous subarrays where the elements form a geometric progression with common ratio r.
Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(packetSizes.length^2) will fit within the execution time limit.
Example
1. For packetSizes = [2, 6, 18, 54, 108] and r = 3, the output should be solution(packetSizes, r) = 7.
Explanation: The valid subarrays are [2], [6], [18], [54], [108], [2, 6], [6, 18], [18, 54], [54, 108], [2, 6, 18], [6, 18, 54], [18, 54, 108], [2, 6, 18, 54], [6, 18, 54, 108], [2, 6, 18, 54, 108]. There are 7 such subarrays.
2. For packetSizes = [5, 5, 5, 5] and r = 1, the output should be solution(packetSizes, r) = 10.
Explanation: Every subarray is a valid geometric progression with common ratio 1. There are 10 such subarrays.
Input/Output
- [execution time limit] 3 seconds (java)
- [memory limit] 1 GB
- [input] array.integer packetSizes
An array of integers representing the sizes of packets captured in a network session.
Question 2
Given an array of integers stockPrices and an array trendPattern representing a price movement pattern, find how many subarrays of stockPrices match the given pattern. trendPattern can only contain the following integers.
trendPattern[i] = 1 represents that the price corresponding to this element of the pattern is higher than the previous one.
trendPattern[i] = 0 represents that the price corresponding to this element of the pattern is equal to the previous one.
trendPattern[i] = -1 represents that the price corresponding to this element of the pattern is lower than the previous one.
It is guaranteed that the stockPrices.length > trendPattern.length.
Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(stockPrices.length × trendPattern.length) will fit within the execution time limit.
Example
1. For stockPrices = [100, 105, 103, 104, 102, 101, 100] and trendPattern = [1, -1, 1], the output should be solution(stockPrices, trendPattern) = 1.
Explanation: Let’s check all possible subarrays of length 3, Subarray [105, 103, 104] matches the pattern because 105 > 103 (trendPattern[0] = 1), 103 < 104 (trendPattern[1] = -1), and 104 > 103 (trendPattern[2] = 1). There is 1 such subarray.
2. For stockPrices = [5, 5, 5, 5, 5, 5] and trendPattern = [0, 0], the output should be solution(stockPrices, trendPattern) = 3.
Explanation: The valid subarrays are [5, 5, 5], [5, 5, 5], and [5, 5, 5]. There are 3 such subarrays.
Question 3
You are managing a shared workspace with multiple meeting rooms. Given an array bookings representing existing bookings for all meeting rooms over the course of a day, and an integer duration representing the length of a new meeting in hours, find the earliest possible time when a meeting of the given duration can be scheduled in any available meeting room. meeting room.
Each element in bookings is an array, such that bookings[i][j] represents the jth booking for the ith meeting room. Each booking is represented by a pair of integers. [startTime, endTime], where each integer represents the number of hours since the start of the day. startTime and endTime do not exceed 24.
Your task is to find the earliest possible time when a meeting of length duration can be scheduled in any meeting room. If there is no time block which suits the requirement, return -1.
Note: The new meeting should also fit within the same day, so the end time for this meeting should not exceed 24.
Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(bookings.length^2 - max(bookings[i].length)^2) will fit within the execution time limit.
Example
bookings = [
[[1, 3], [6, 9]], [[0, 2], [12, 14]], [[1, 2], [12, 14]]
[[0, 2], [12, 14]]
]
and duration = 2, the output should be solution(bookings, duration) = 5.
Explanation:: The earliest available time block of duration 2 hours is from 5 to 7 in the first meeting room.
如何高效准备 Meta OA
结合实际经验,总结几条对准备 Meta OA 最有帮助的建议:
第一,刷题时要按“题型模型”而不是按数量准备。
数组、哈希、滑动窗口、BFS/DFS 是出现频率最高的几类。
第二,必须进行限时模拟。
在不依赖运行结果的情况下完成实现,是 OA 中的常态。
第三,重视边界条件。
Meta OA 的隐藏测试用例往往集中在极端输入和特殊情况。
第四,练习代码表达能力。
即使是 OA,清晰的变量命名和结构也会减少低级错误。
Meta OA 求职痛点?专业护航直达面试
Meta OA 高频困境
Meta OA 多轮测评严苛,Coding 题测试用例刁钻,时间紧张易卡壳;后续 VO 面追问深入,边界分析、思路延展要求高,单靠刷题难应对,不少人折在初筛环节。
针对性解决方案
ProgramHelp 专攻 Meta 全流程:OA 代写100%过用例,不通过不收费;北美 CS 专家实时 VO 辅助,精准匹配面试官关注点;全套包过服务预付定金,拿 Offer 再付尾款。已有学员顺利通关,少走弯路拿 Meta Offer。