Meta OA 一畝三分地 | Experience & Guide 2026: How to Prepare It

1,489Views

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 thatform 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 availablemeeting 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。

author avatar
Jack Xu MLE | 微軟人工智慧技術人員
Princeton University博士,人在海外,曾在谷歌、蘋果等多家大廠工作。深度學習NLP方向擁有多篇SCI,機器學習方向擁有Github千星⭐️專案。
END