google logo
Google· swe sre

Google swe sre Onsite round 1

Posted
9 Dec 2025
382 reads

Summary

I had an onsite interview for the SRE role at Google, where I was tasked with designing and implementing file system utility functions, including a crucial follow-up to delete an entire directory tree.

How it went

I recently had my first onsite interview round for the Software Engineer, Site Reliability Engineer (SRE) role at Google. The interview focused heavily on file system operations and design. I was initially asked to implement several core file system utility functions, which served as building blocks for a more complex problem. The primary challenge involved efficiently deleting a directory tree.

Questions asked (2)

  1. 01

    File System Utility Functions

    Data Structures & Algorithms

    Implement the following file system utility functions which could be used to interact with a file system:

    • fs.GetDirectoryChildren(path): Given a path to a directory, return a list of its immediate children (files and subdirectories).
    • fs.Delete(path): Delete a file or an empty directory at the given path.
    • bool fs.IsDirectory(path): Determine if the given path corresponds to a directory.

  2. 02

    Delete Directory Tree

    Data Structures & Algorithms

    As a follow-up, implement the function deleteDirectoryTree(path). This function should recursively delete a directory and all its contents (subdirectories and files) starting from the given path. You should leverage the previously defined file system utility functions like GetDirectoryChildren, Delete, and IsDirectory to achieve this efficiently.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Google recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!