五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
亚东县| 永州市| 清河县| 兴仁县| 时尚| 湟源县| 合作市| 收藏| 阳信县| 济阳县| 噶尔县| 佛学| 电白县| 个旧市| 昌邑市| 荔浦县| 迁西县| 浦县| 独山县| 鲁山县| 旌德县| 绥芬河市| 卓尼县| 武宣县| 海南省| 滁州市| 色达县| 山东| 马尔康县| 米脂县| 辽阳市| 杨浦区| 丹凤县| 金川县| 沐川县| 鄂尔多斯市| 夹江县| 岚皋县| 石河子市| 濮阳市| 黔江区|