You are given an absolute path for a Unix-style file system, which always begins with a slash '/'. Your task is to transform this absolute path into its simplified canonical path.
The rules of a Unix-style file system are as follows:
'.' represents the current directory.'..' represents the previous/parent directory.'//' and '///' are treated as a single slash '/'.'...' and '....' are valid directory or file names.The simplified canonical path should follow these rules:
'/'.'/'.'/', unless it is the root directory.'.' and '..') used to denote current or parent directories.Return the simplified canonical path.
1 <= path.length <= 3000path consists of English letters, digits, period '.', slash '/' or '_'.path is a valid absolute Unix path.path = "/home/""/home"path = "/home//foo/""/home/foo"path = "/home/user/Documents/../Pictures""/home/user/Pictures"path = "/../""/"path = "/.../a/../b/c/../d/./""/.../b/d"