Spotify SDE Interview Question 2024 May | Object-Oriented Design & Tries | Off-campus
Question · Posted Jun 2026
Question 1: Design In-Memory File System Problem Statement Design a robust data structure that simulates an in-memory file system. Implement the FileSystem class: FileSystem(): Initializes the object of the system. List<String> ls(String path): If path is a file path, returns a list that only contains this file's name. If path is a directory path, returns the list of file and directory names strictly in this directory. The answer must be sorted mathematically in lexicographical order. void mkdir(String path): Makes a ...
The full answer & interview discussion are available to premium members.
Log in Create a free account