Ramp OA 面经分享:三层递进考察,别小看基础题

1,131次閱讀

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 same name 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。
正文完