Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Simplify Path
Hard
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Simplify Unix-style file path.
Sample Input:
"/home/"
Sample Output:
"/home"
Hints
Hint 1
Split path by slashes
Hint 2
Use stack to handle directories
Hint 3
Ignore '.' and handle '..' by popping
Code Editor
Reset
Run
Save
Loading...