Ramp OA 面經分享:三層遞進考察,別小看基礎題

1,132Views

Ramp 的 Online Assessment 在近一年明顯成為篩人“分水嶺”。它並不是傳統意義上刷 LeetCode 就能穩過的 OA,而是透過一個逐層遞進的業務型題目設計,系統性考察候選人的程式碼組織能力、資料結構設計思維,以及對邊界條件的處理是否嚴謹。結合我們近期陪跑多位同學完整走完 Ramp OA 的實際反饋,下面從 OA 結構、真題拆解、隱藏考點、以及高頻失誤點 四個維度,系統覆盤這套 OA。

Ramp OA 基本資訊概覽

  • 考試形式:線上程式設計測評(非純演算法刷題)
  • 考試時長:約 90 分鐘
  • 語言選擇:Python / Java / C++ 等主流語言
  • 題目結構:單一業務背景,分 Level 逐步加難
  • 核心特點:
    • 前一層寫錯,後面幾乎無法繼續
    • 程式碼正確性 + 設計合理性同等重要

Ramp OA 的整體難度並不靠“演算法強度”取勝,而是靠細節密度和邏輯完整性篩人。

Ramp OA 面經分享:三層遞進考察,別小看基礎題

真題內容

Level 1

The cloud storage system should support file manipulation.

  • add_file(self, name: str, size: int) -> bool — should add a new file name to the storage. size is the amount of memory required in bytes. The current operation fails if a file with the samename already exists. Returns True if the file was added successfully or False otherwise.
  • get_file_size(self, name: str) -> int | None — should return the size of the file name if it exists, or None otherwise.
  • delete_file(self, name: str) -> int | None — should delete the file name. Returns the deleted file size if the deletion was successful or None if the file does not exist.

Examples

add_file("/dir1/dir2/file.txt", 10) → True
add_file("/dir1/dir2/file.txt", 5) → False
get_file_size("/dir1/dir2/file.txt") → 10
delete_file("/non-existing.file") → None
delete_file("/dir1/dir2/file.txt") → 10
get_file_size("/not-existing.file") → None

Level 2

Implement an operation for retrieving some statistics about files with a specific prefix.

  • get_n_largest(self, prefix: str, n: int) -> list[str] — should return the list of strings representing the names of the top n largest files with names starting with prefix in the following format: ["<name_1>(<size_1>)", ..., "<name_n>(<size_n>)"].

Sorting rules:

  1. By size (descending)
  2. If tie → lexicographical order

Examples

add_file("/dir/file1.txt", 5) → True
add_file("/dir/file2", 20) → True
add_file("/dir/deeper/file3.mov", 9) → True
get_n_largest("/dir", 2) → ["/dir/file2(20)", "/dir/deeper/file3.mov(9)"]
get_n_largest("/dir/file", 3) → ["/dir/file2(20)", "/dir/file1.txt(5)"]
add_file("/another_dir", "file.txt") → None (invalid input)
add_file("/big_file.mp4", 20) → True
get_n_largest("/", 2) → ["/big_file.mp4(20)", "/dir/file2(20)"]

Level 3

Implement support for queries from different users.

  • add_user(self, user_id: str, capacity: int) -> bool — add new user with storage limit. Fail if user already exists.
  • add_file_by(self, user_id: str, name: str, size: int) -> int | None — similar to add_file, but restricted by user’s remaining capacity. Return remaining capacity if success, None otherwise.
  • merge_user(self, user_id_1: str, user_id_2: str) -> int | None — merge user2 into user1: transfer files and add remaining capacity. Delete user2 after merge.

⚠️ Note: All queries calling the add_file from Level 1 are run by "admin" who has unlimited storage.

我的體驗

Ramp OA 不是單純的演算法題,更像是 考察代碼設計能力:

  • Level 1 基礎,主要考查你是否能 clean code。
  • Level 2 開始考察 排序+數據結構選擇,要保證複雜度。
  • Level 3 更偏系統設計,需要考慮 多使用者限制、存儲管理、merge 邏輯。

我個人覺得難點是 設計數據結構,一開始要選好字典嵌套、還是類存儲,不然後面加功能會很麻煩。

你離 Offer 只有一步之遙 & Programhelp

這次 Ramp OA 我最後是靠提前刷過類似題型才比較順利。 如果你也即將面 Ramp 或類似 OA,想要更快更穩,其實可以考慮 Programhelp

團隊有 Amazon、Google 工程師和牛津、清華學長,提供 OA 代寫、無痕連線助攻、VO 即時提示、面試類比 等服務。 比起單刷題,效率和通過率都會高很多。

聯繫我們,讓我們幫你一起搞定 OA,拿下理想的機會!

author avatar
Jory Wang Amazon資深軟體開發工程師
Amazon 資深工程師,專注 基礎設施核心系統研發,在系統可擴充套件性、可靠性及成本最佳化方面具備豐富實戰經驗。 目前聚焦 FAANG SDE 面試輔導,一年內助力 30+ 位候選人成功斬獲 L5 / L6 Offer。
END