2018年11月6日

简化路径(栈实现)

摘要: 你是否考虑了 路径 = "/../" 的情况?在这种情况下,你需返回 "/" 。 此外,路径中也可能包含多个斜杠 '/' ,如 "/home//foo/" 。在这种情况下,你可忽略多余的斜杠,返回 "/home/foo" 。 char* simplifyPath(char* path) { char 阅读全文

posted @ 2018-11-06 11:06 Beyond_YYL 阅读(248) 评论(0) 推荐(0) 编辑

导航