Daily challenge for 2026-09-27
635. Document Folder Path Simplifier
You are given a list of string commands representing navigation through a folder structure. The commands can be a folder name (move into that folder), '..' (move up one folder), or '.' (stay in the current folder). Return the final simplified path as a list of folder names from the root. If you are at the root and receive '..', you remain at the root.
Example:Input: commands = ["docs", "projects", "..", "images", ".", "vacation"]Output: ["docs", "images", "vacation"]
Run this challenge interactively in Python or JavaScript when the app loads.