Simplify Path at Meta

Medium50.0% acceptance

This problem has 87.5% frequency at Meta.

Problem Description

You are given an _absolute_ path for a Unix-style file system, which always begins with a slash `'/'`. Your task is to transform this absolute path into its **simplified canonical path**. The _rules_ of a Unix-style file system are as follows: * A single period `'.'` represents the current direc...

Read full problem and hints

Topics

Also asked at 24 companies


More Meta Questions

View all Meta questions