d********e 发帖数: 132 | 1 在网上看到这个题:
given a path like: dir1/dir2/../dir3/./dir4, where ‘..’ means parent
directory and ‘.’ Means current directory, condense the given path. For
example, for the given string, the result should be: dir1/dir3/dir4
这道题是编程题还是用UNIX 命令? | h********0 发帖数: 440 | 2 你可以都try一下。。。
In fact, this question was asked by Microsoft as coding questions.
May I know where you found this question (can you give me a link?)
【在 d********e 的大作中提到】 : 在网上看到这个题: : given a path like: dir1/dir2/../dir3/./dir4, where ‘..’ means parent : directory and ‘.’ Means current directory, condense the given path. For : example, for the given string, the result should be: dir1/dir3/dir4 : 这道题是编程题还是用UNIX 命令?
| B*****t 发帖数: 335 | 3 估计是编程题, use stack
【在 d********e 的大作中提到】 : 在网上看到这个题: : given a path like: dir1/dir2/../dir3/./dir4, where ‘..’ means parent : directory and ‘.’ Means current directory, condense the given path. For : example, for the given string, the result should be: dir1/dir3/dir4 : 这道题是编程题还是用UNIX 命令?
|
|