Back to Browse

Crawler Log Folder - Leetcode 1598 - Java

26 views
Jul 10, 2024
5:00

🧩 *PROBLEM DESCRIPTION* 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._ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 🔗 *LINKS* ⭐Problem: https://leetcode.com/problems/crawler-log-folder/ 💻Code: https://k5kc.com/cs/problems/crawler-log-folder/ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 📂 *RELATED PLAYLISTS To Explore* 📃 Array Datastructure: https://www.youtube.com/playlist?list=PLB53ggSrd6qkSyvwZxLym8mYgjgGFVcs8 📚 Stack Data Structure: https://www.youtube.com/playlist?list=PLB53ggSrd6qkVc2unL_xP1iVUC2I1hZyT 🔤 String Datastructure: https://www.youtube.com/playlist?list=PLB53ggSrd6qkQWiNs58TAPorNIvYQlfy_ 🟢 Easy Coding Problems: https://www.youtube.com/playlist?list=PLB53ggSrd6qlIa5z85qXrwS2J0s8xBY0u ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 🔔 _SUPPORT AND SUBSCRIBE_ Don’t forget to **like**, **subscribe**, and **comment** for more problem-solving content! 🚀 🎯 _Follow me for updates_: GitHub: https://github.com/kinshuk4 Twitter: https://x.com/k5kc_ Instagram: https://www.instagram.com/_k5kc_/ LinkedIn: https://www.linkedin.com/company/k5kc/

Download

0 formats

No download links available.

Crawler Log Folder - Leetcode 1598 - Java | NatokHD