Meta Online Assessment real question sharing|4 Levels 40 minutes AC (2026 latest)

1,921 Views

Just finished it yesterday Meta Online Assessment, a set of four questions, is a memory cloud storage simulation system with level unlocking. I spent about 40 minutes on AC. The overall feeling is that it is not particularly difficult, but the data structure design must be clearly thought out, otherwise writing Level 3 and Level 4 will be messy. Share my thoughts and pitfalls.

Meta Online Assessment real question sharing|4 Levels 40 minutes AC (2026 latest)

Meta OA overall situation

  • Duration:90 minutes
  • Question type: A large-scale memory cloud storage system simulation question, divided into 4 levels to gradually unlock
  • Language:Supports Python, Java, C++ (I use Python)
  • Features: The code of the preceding Level will directly affect the subsequent Level. The data structure must be designed well, otherwise it will be very painful later. Meta increasingly likes this kind of state persistence + gradually enhanced questions, which tests code organization ability and systematic thinking.

The topic requires the implementation of a simple memory cloud storage system that only needs to maintain the meta-information of files (name, size, owner, etc.) without actually operating the file system.

Detailed analysis of each Level

Level 1: Basic file operations

The following three core operations are supported:

  • AddFile(string name, int size) - add a new file
  • CopyFile(string nameFrom, string nameTo) - copy file
  • GetFileSize(string name) - Query file size

My implementation ideas: Maintain state with two core dictionaries:

  • Files: path → size
  • Owner: path → user_id (initially all files belong to “admin”)

This key focus is on handling same-name conflicts and state synchronization during replication.

Level 2: Find files by prefix/suffix

New method: find_file(self, prefix: str, suffix: str) -> list[str]

Return format example: ["notes.txt(1024)", "report.pdf(2048)", …]

Sorting rules:

  1. Sort descending by file size
  2. If the sizes are the same, the file names are sorted in ascending dictionary order.

Ideas: Traverse the files dictionary to perform prefix and suffix matching, collect the results and perform double-keyword sorting (this can be easily implemented using sorted + key in Python).

Level 3: Multiple users and capacity limitations

Introduce user system:

  • Add_user(user_id: str, capacity: int)
  • Add_file_by(user_id: str, name: str, size: int)

Core changes:

  • Each user has an independent capacity limit
  • AddFile is executed by admin by default (no capacity limit)
  • CopyFile inherits the original file owner
  • New files need to check the user's remaining capacity

Ideas: Add users = {user_id: remaining_capacity} dictionary, perform capacity verification when adding/copying files, and return None if the limit is exceeded.

Level 4: File compression

Added compress_file(user_id: str, name: str)

Compression rules:

  • New file name = name + ".COMPRESSED"
  • New size = original size // 2 (the question must be an even number)
  • Owner remains unchanged
  • Update user remaining capacity

Ideas:

  1. Check if the file exists and belongs to this user
  2. Delete original file record
  3. Add new compressed files
  4. Update user capacity

This level requires special attention to status synchronization, and no dictionary updates can be missed.

My core data structure (recommended)

Self.files = {} # path -> size
self.owner = {} # path -> user_id
self.users = {} # user_id -> remaining_capacity

The entire system status is highly unified, and logic is gradually added as Level is unlocked, thus avoiding the problems of duplicate code and inconsistent status.

AC Key Lessons:

  • Designing clear and scalable data structures in advance is the most important thing
  • Each operation must update all related dictionaries synchronously
  • Pay special attention to CopyFile's ownership inheritance and capacity checks
  • Compressed files cannot be compressed repeatedly (the question has been guaranteed, but the code still needs to be robust)

About Meta Interview & AI Coding

Many people may have only played LC and have not practiced this kind of scenario-based multi-level OA.
I was able to get AC quickly this time mainly because I was familiar with this type of "state maintenance + business rule superposition" questions in advance. Also, now the Meta interview will test AI Coding. The interviewer will write code with you and talk about ideas, test cases, and boundary conditions while writing.
Many people have never faced this kind of situation and easily panic.

If you are also preparing for OA/interviews at Meta or other major companies, and want to practice this kind of multi-level card recognition questions with users, capacity, compression, and permissions, or want to adapt to the rhythm of AI Coding in advance, you can Contact us . I have organized this entire set of questions myself into a practice environment, and you can also arrange mock interviews. If you need it, just message me privately. I wish everyone OA and AC good luck with their interviews!

author avatar
Jory Wang Amazon Senior Software Development Engineer
Amazon senior engineer, focusing on the research and development of infrastructure core systems, with rich practical experience in system scalability, reliability and cost optimization. Currently focusing on FAANG SDE interview coaching, helping 30+ candidates successfully obtain L5/L6 Offers within one year.
END
 0