Slack SWE Interview Question 2024 June | Stacks | on-campus

Question · Posted Jun 2026

Question 1: Simplify Path Problem Statement Given an absolute path for a Unix-style file system, which begins with a slash '/', transform this path into its simplified canonical path. In a Unix-style file system: A single period '.' refers to the current directory. A double period '..' refers to the directory up a level (parent directory). Multiple consecutive slashes (i.e. '//') are treated as a single slash '/'. Any sequence of periods that does not match the above rules is ...

The full answer & interview discussion are available to premium members.

Log in Create a free account