SShrishinleetcode.hashnode.dev·May 5, 2023 · 1 min readLeetcode 71 Simplify PathApproach 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...00
SShrishinleetcode.hashnode.dev·Apr 23, 2023 · 2 min readLeetcode 133 Clone GraphIt is highly recommended that you try solving the problem independently by reading the specifications at https://leetcode.com/problems/clone-graph/ before looking at the solution. This will help improve your problem-solving abilities. Graphs are a wi...00