388. Longest Absolute File Path
2016-12-29 本文已影响0人
我是你的果果呀
Suppose we abstract our file system by a string in the following manner:
The string"dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext"represents:
![](https://img.haomeiwen.com/i3805437/2c2bae43004ffc76.png)
length[cur+1] = length[cur] + path.length() -cur +1;
![](https://img.haomeiwen.com/i3805437/e6ede19bbe9f5992.png)