---
title: "Discussion on \"Leetcode 71 Simplify Path\" | Hashnode"
description: "Discussion on \"Leetcode 71 Simplify Path\". Approach\nThe idea is to get rid of unnecessary tokens from the path. Three types of tokens can be cleaned.\nThe empty token \"//\" --> \"/\".\n\".\" token: /a/./b\" -> \"/a/b\"\n\"..\" token : \"/a/../b\" -> \"b\".\nAlgorithm\n\nSplit the path into tokens separated by th..."
url: "https://hashnode.com/posts/leetcode-71-simplify-path/645551825a3485dcd055f193"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Leetcode 71 Simplify Path](https://leetcode.hashnode.dev/leetcode-71-simplify-path?utm_source=hashnode&utm_medium=feed)

Approach The idea is to get rid of unnecessary tokens from the path. Three types of tokens can be cleaned. The empty token "//" --> "/". "." token: /a/./b" -> "/a/b" ".." token : "/a/../b" -> "b". Algorithm Split the path into tokens separated by th...

May 5, 2023 · 1 min read · leetcode.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#leetcode-problem-71-simplify-path](https://hashnode.com/tag/leetcode-problem-71-simplify-path)

## Written by

[Shrish](https://hashnode.com/@shrishmishra)

@shrishmishra

  
[View profile](https://hashnode.com/@shrishmishra)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
