After finishing the Ramp OA, I spent hours browsing forums and realized there was almost no detailed information online.
The OA was hosted on CodeSignal: 90 minutes, 4 progressive levels. You had to fully pass the current level before unlocking the next one. This was very different from standard LeetCode-style algorithm questions. The focus was much more on system design thinking, state management, and code organization.
Here’s the full breakdown of all four levels.
Problem Background
The task was to implement an in-memory cloud storage system. No real filesystem operations — everything stayed in memory. The system mapped file paths to corresponding metadata.
Level 1 — Basic File Operations
Three APIs:
- Add file
- Query file size
- Delete file
Rules were straightforward:
- Cannot add duplicate files
- Delete should return the file size if successful
- Return
Noneif the file does not exist
A simple hashmap solved the entire level in under 5 minutes.
class CloudStorage:
def __init__(self):
self.files = {}
def add_file(self, name, size):
if name in self.files:
return False
self.files[name] = size
return True
def get_file_size(self, name):
return self.files.get(name)
def delete_file(self, name):
return self.files.pop(name, None)
Level 2 — Top N Largest Files
Filter files by prefix and return the largest N files in this format:
/path/file(size)
Sorting rules:
- Sort by size descending
- If sizes are equal, sort lexicographically by filename ascending
def get_n_largest(self, prefix, n):
matched = [
(name, size)
for name, size in self.files.items()
if name.startswith(prefix)
]
matched.sort(key=lambda x: (-x[1], x[0]))
return [
f"{name}({size})"
for name, size in matched[:n]
]
Biggest pitfall: The double-condition sorting. If you forget the negative sign for descending size order, hidden tests fail immediately.
Level 3 — User Capacity & Merge Logic
This level introduced users. Each user had:
- Storage capacity
- Owned files
- Used storage tracking
The system also supported merging two users.
Merge rules:
- Files from
user_2are merged intouser_1 - If filename conflicts occur, files from
user_2are discarded - Capacities are combined
-
user_2is deleted afterward
def merge_user(self, user_id_1, user_id_2):
if user_id_1 not in self.users or user_id_2 not in self.users:
return False
u1 = self.users[user_id_1]
u2 = self.users[user_id_2]
for name, size in u2["files"].items():
if name not in u1["files"]:
u1["files"][name] = size
u1["used"] += size
u1["capacity"] += u2["capacity"]
del self.users[user_id_2]
return True
Main pitfall:
Do NOT recalculate used capacity by iterating through all files every time.
Maintain a dedicated used field instead.
Level 4 — Backup & Restore
The final level added snapshot support. Users could back up their storage state and restore it later by timestamp.
import copy
def backup_user(self, user_id, timestamp):
if user_id not in self.users:
return False
if user_id not in self.backups:
self.backups[user_id] = {}
self.backups[user_id][timestamp] = copy.deepcopy(
self.users[user_id]
)
return True
def restore_user(self, user_id, timestamp):
if (
user_id not in self.backups or
timestamp not in self.backups[user_id]
):
return False
for name in self.users[user_id]["files"]:
self.files.pop(name, None)
self.users[user_id] = copy.deepcopy(
self.backups[user_id][timestamp]
)
for name, size in self.users[user_id]["files"].items():
self.files[name] = size
return True
Largest pitfall here:
Always use deepcopy.
A shallow copy causes later modifications to corrupt old snapshots.
Another easy mistake: During restore, you must first remove the user’s current files from the global storage map before restoring snapshot contents.
Overall Pattern
Across all four levels, the real difficulty was keeping three separate data structures perfectly synchronized:
- Global file map
- User-owned file maps
- Backup snapshots
If any one of them became inconsistent, hidden tests would fail.
Strong recommendation: Before coding, draw out the full data structure relationships. Once Level 3 and Level 4 start stacking features together, knowing exactly which states need synchronization becomes extremely important.
About ProgramHelp
One thing I didn’t expect was how many “follow-up edge cases” completely blanked my brain during the OA.
Before taking the Ramp OA, I worked with ProgramHelp for targeted preparation.
They had already compiled a set of high-frequency CodeSignal OOD-style problems, including cloud storage system designs very similar to this one.
The Level 3 merge logic and the Level 4 deepcopy trap were both things they specifically warned me about beforehand, which honestly saved a lot of time during the actual assessment.
Their coaching is done by real North American CS experts instead of generic AI tools, and they focus heavily on identifying the actual hidden evaluation points behind these OA systems.
Services include:
- OA assistance
- Online assessment support
- VO interview guidance
- Resume optimization
Top comments (0)