国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【每日一題】LeetCode1598-Crawler Log Folder

2022-09-09 23:03 作者:安然Nano  | 我要投稿

Difficulty: easy????CompletionTime: 49s

The Leetcode file system keeps a log each time some user performs a?change folder?operation.

The operations are described below:

  • "../"?: Move to the parent folder of the current folder. (If you are already in the main folder,?remain in the same folder).

  • "./"?: Remain in the same folder.

  • "x/"?: Move to the child folder named?x?(This folder is?guaranteed to always exist).

You are given a list of strings?logs?where?logs[i]?is the operation performed by the user at the?ith?step.

The file system starts in the main folder, then the operations in?logs?are performed.

Return?the minimum number of operations needed to go back to the main folder after the change folder operations.

LeetCode 1598

純模擬題,最后所在文件樹的深度即為所求結(jié)果。


【每日一題】LeetCode1598-Crawler Log Folder的評論 (共 條)

分享到微博請遵守國家法律
浙江省| 思茅市| 玉溪市| 金门县| 利川市| 军事| 航空| 叶城县| 阿鲁科尔沁旗| 泗水县| 许昌县| 益阳市| 醴陵市| 孝昌县| 湖南省| 伊宁市| 临洮县| 尼玛县| 潢川县| 闽清县| 新巴尔虎左旗| 旌德县| 尚义县| 祥云县| 京山县| 太仆寺旗| 赤城县| 弥渡县| 安溪县| 奉节县| 桦甸市| 定边县| 天长市| 岢岚县| 白玉县| 教育| 昌乐县| 勐海县| 长沙市| 安化县| 白朗县|