Thrilling 90-Minute Meta Software Engineer Interview: Mastering Data Structures & Greedy Algorithms

meta | Software Engineer | Interview Experience

Interview Date: Not specified
Result: Not specified
Difficulty: Not specified

Interview Process

The interview consisted of a 90-minute, four-level coding challenge focused on building a cloud storage system. Candidates must pass all unit tests in the current level to unlock the next level.

  • Level 1: Implement basic functions such as addFile, copyFile, and getFileSize.
  • Level 2: Develop a function getLargestFile(prefix, suffix) that returns the filename and size of all files matching both a given prefix and suffix, sorted by size (largest to smallest) and then by filename (ascending) in case of ties.
  • Level 3: Introduce user management with functions addUser and addFileBy. Each file must have an owner, and users have limited storage capacity. The function updateCapacity() must ensure that if the used space exceeds the new capacity, the largest file owned by the user is deleted until the used space is below the capacity.
  • Level 4: Implement compressFile and decompressFile. Compressing a file reduces its size to half and appends “compressed” to the filename, while decompressing restores the original size and filename. This level includes additional corner cases that require time for debugging.

Technical Questions

  1. Data Structure
  2. Sorting
  3. Greedy Algorithm
  4. String Manipulation

Tips & Insights

  • Focus on understanding the requirements clearly for each level before coding.
  • Pay attention to edge cases, especially during the compression and decompression stages.
  • Practice debugging strategies to efficiently resolve issues that arise during implementation.