I just put Ramp after finishing the 2026 OA, while the memory is still fresh, let me give you a complete review. This written test was completed on CodeSignal, with a total of 90 minutes and 4 lines of coding. The whole process required camera proctoring, and no pauses were allowed in the middle. The overall pace was quite tight. If it is your first time to do this kind of OA with 4 consecutive questions + strong proctoring, the pressure will be significantly greater than ordinary HackerRank.

Level 1
Cloud storage systems need to support file operations:
Add_file(self, name: str, size: int) -> bool: Adds a file namedNameNew file,SizeIs the number of bytes of memory required for the file. If the file with the same name already exists, the operation fails. File added successfully returnsTrue, otherwise returnFalse.Get_file_size(self, name: str) -> int | None: If fileNameIf it exists, return its size, otherwise returnNone.Delete_file(self, name: str) -> int | None: Delete filesName. If the deletion is successful, the size of the deleted file will be returned. If the file does not exist, it will be returned.None.
Problem-solving ideas:
Level 1 requires you to maintain a mapping of file name -> file size. It needs to support addition and deletion checks, and return bool or None as required. Just use a hash table to manage the status, and clearly determine the two boundary conditions of repeated additions and deletions.
Level 2
Implement an operation that retrieves statistics for files with a specific prefix:
Get_n_largest(self, prefix: str, n: int) -> list[str]: Returns the name toPrefixBefore the beginningNList of largest files in the format["()", ..., "()"].- Files are sorted in descending order by size; if they are the same size, they are sorted in ascending dictionary order by file name.
- If there are no files that meet the criteria, an empty list is returned; if the number of files that meet the criteria is less than
N, all files that meet the criteria are returned.
Problem-solving ideas:
There is a new feature that requires you to search for the top n largest files. That is to do prefix filtering on existing files, and then take out the top n largest files. Sort by size in descending order and file name in ascending order. Just sift directly in the hash table we saved, sort again, and finally return a string according to the specified format.
Level 3
To achieve multi-user support, all users share the same file system, but each user has a storage capacity limit:
Add_user(self, user_id: str, capacity: int) -> bool:Add a new user,CapacityIs the upper limit of its storage capacity (bytes). LikeUser_idIf it already exists, the operation will fail. Successful creation returnsTrue, otherwise returnFalse.Add_file_by(self, user_id: str, name: str, size: int) -> int | None:Function and Level 1Add_fileConsistent, but the file belongs toUser_idAll. If adding it will exceed the user capacity limit, it cannot be added. If the addition is successful, the remaining capacity of the user will be returned, otherwise it will be returned.None.- Note: Level 1 Medium
Add_fileThe operation defaults toUser_id = "admin"Execution, admin has unlimited storage capacity.
- Note: Level 1 Medium
Merge_user(self, user_id_1: str, user_id_2: str) -> int | None:WillUser_id_2Accounts merged intoUser_id_1.User_id_2Ownership of all files is transferred toUser_id_1, the remaining capacity is also added toUser_id_1Within the capacity limit. After successful mergerUser_id_2Deleted, returnedUser_id_1The remaining capacity after the merger; if any user does not exist, it will be returnedNone.
Problem-solving ideas:
It is necessary to add user-dimensional capacity management and account merging logic on the basis of the global file system. We can use multiple hash tables for hierarchical maintenance: a global hash table records the ownership and size of all files, and then a user-specific hash table records the used capacity and total capacity limit of each user. When adding a user, check whether the ID is duplicated; when adding a file, verify whether the user capacity is sufficient, and only write and update the remaining capacity if the conditions are met; when merging accounts, transfer the file ownership of the merged user, accumulate the capacity, and finally delete the merged user, ensuring the consistency of the file status and user capacity data throughout the process.
Level 4
Implement user file backup function:
Backup_user(self, user_id: str) -> int | None: backupUser_idThe current state (file name and size) of all files, backups are stored in a separate system and are not affected by subsequent file operations. If the user already has a backup, it will be overwritten. Returns the number of backup files if the backup is successful, or returns if the user does not exist.None.Restore_user(self, user_id: str) -> int | None:WillUser_idThe file status is restored to the most recent backup. If it has never been backed up, all files of the user will be deleted. If it cannot be restored because another user already has a file with the same name, the file will be ignored. Returns the number of recovered files if the recovery is successful, or returns if the user does not exist.None.- Notice:
Merge_userDoes not affectUser_id_1Backup,User_id_2And its backups will be deleted. - Notice:
Restore_userThe operation does not affect the user's capacity limit.
- Notice:
Problem-solving ideas:
Adding backup and recovery functions on top of Level 3 requires additional maintenance of independent storage for user backup snapshots. When backing up, the status (name and size) of all the user's current files are saved as snapshots, overwriting old backups; when restoring, the user's current files are first cleared, and then the snapshots are traversed one by one to try to restore. When encountering globally existing files with the same name, they are skipped. Finally, the number of successfully restored files is counted, while ensuring that the backup data is not affected by subsequent operations, and the restore operation does not change the user's capacity limit.
About how to survive Ramp OA
Ramp OA is tight on time, has many hidden cases, and has cameras turned on, so many students are easily stuck. I have helped hundreds of students from all backgrounds get ashore successfully. If you need help, you can go to Programhelp directly. Team members come from Oxford, Princeton, Peking University and Amazon/Google/Alibaba, all OA ghostwriting And CodeSignal test taking are all conducted in person. All test cases pass 100%, full refund if not passed. 24-48 hours expedited, direct docking.