Simplify a File Path

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

Given an absolute Unix-style file path that may contain repeated slashes, single dots meaning the current folder and double dots meaning the parent folder, reduce it to its simplest form. Explain how a stack helps.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →