Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Split the path by slash and process tokens with a stack. Ignore empty and dot tokens, pop for double-dot tokens when possible, and push normal directory names. Join stack contents with slashes for the canonical path.
Each token updates directory state locally: entering pushes, parent traversal pops. The stack always represents the current canonical absolute path.
Updated Feb 2026