2022-3-19 Leetcode 71. 简化路径
第一版
class Solution {
public:
string simplifyPath(string path) {
vector
string ret;
int i = 0;
int len = path.size();
while(i < len){
int count = 0;
int alpha = 0;
string word;
while(i < len && path[i] == '.'){
count++;
i++;
}
if(count == 2){
共有 0 条评论