You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[Leetcode-637](https://leetcode.com/problems/average-of-levels-in-binary-tree/)| Average Of Levels In Binary Tree |[c++](./leetcode/637.average-of-levels-in-binary-tree.cpp), [python3](./leetcode/637.average-of-levels-in-binary-tree.py)| Depth-First Search | O\(N\)| O\(N\)| - |
|[Leetcode-235](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)| Lowest Common Ancestor Of A Binary Search Tree |[c++](./leetcode/235.lowest-common-ancestor-of-a-binary-search-tree.cpp), [python3](./leetcode/235.lowest-common-ancestor-of-a-binary-search-tree.py)| Depth-First Search | O\(N\)| O\(H\)| - |
745
747
|[Leetcode-236](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)| Lowest Common Ancestor Of A Binary Tree |[c++](./leetcode/236.lowest-common-ancestor-of-a-binary-tree.cpp), [python3](./leetcode/236.lowest-common-ancestor-of-a-binary-tree.py)| Depth-First Search | O\(N\)| O\(H\)| - |
746
748
|[Leetcode-695](https://leetcode.com/problems/max-area-of-island/)| Max Area Of Island |[c++](./leetcode/695.max-area-of-island.cpp), [python3](./leetcode/695.max-area-of-island.py)| Depth-First Search | O\(MN\)| O\(MN\)| - |
|[Leetcode-237](https://leetcode.com/problems/delete-node-in-a-linked-list/)| Delete Node In A Linked List |[python3](./leetcode/237.delete-node-in-a-linked-list.py)| Other |\-|\-| - |
949
951
|[Leetcode-498](https://leetcode.com/problems/diagonal-traverse/)| Diagonal Traverse |[c++](./leetcode/498.diagonal-traverse.cpp)| Other |\-|\-| - |
950
952
|[Leetcode-29](https://leetcode.com/problems/divide-two-integers/)| Divide Two Integers |[c++](./leetcode/29.divide-two-integers.cpp), [python3](./leetcode/29.divide-two-integers.py)| Other |\-|\-| - |
951
-
|[Leetcode-271](https://leetcode.com/problems/encode-and-decode-strings/)| Encode And Decode Strings |[c++](./leetcode/271.encode-and-decode-strings.cpp), [python3](./leetcode/271.encode-and-decode-strings.py)| Other |\-|\-| - |
952
953
|[Leetcode-535](https://leetcode.com/problems/encode-and-decode-tinyurl/)| Encode And Decode Tinyurl |[python3](./leetcode/535.encode-and-decode-tinyurl.py)| Other |\-|\-| - |
953
954
|[Leetcode-282](https://leetcode.com/problems/expression-add-operators/)| Expression Add Operators |[c++](./leetcode/282.expression-add-operators.cpp), [python3](./leetcode/282.expression-add-operators.py)| Other |\-|\-| - |
954
955
|[Leetcode-760](https://leetcode.com/problems/find-anagram-mappings/)| Find Anagram Mappings |[python3](./leetcode/760.find-anagram-mappings.py)| Other |\-|\-| - |
|[Leetcode-747](https://leetcode.com/problems/largest-number-at-least-twice-of-others/)| Largest Number At Least Twice Of Others |[c++](./leetcode/747.largest-number-at-least-twice-of-others.cpp)| Other |\-|\-| - |
978
979
|[Leetcode-17](https://leetcode.com/problems/letter-combinations-of-a-phone-number/)| Letter Combinations Of A Phone Number |[c++](./leetcode/17.letter-combinations-of-a-phone-number.cpp), [python3](./leetcode/17.letter-combinations-of-a-phone-number.py)| Other |\-|\-| - |
979
980
|[Leetcode-359](https://leetcode.com/problems/logger-rate-limiter/)| Logger Rate Limiter |[c++](./leetcode/359.logger-rate-limiter.cpp)| Other |\-|\-| - |
|[Leetcode-14](https://leetcode.com/problems/longest-common-prefix/)| Longest Common Prefix |[c++](./leetcode/14.longest-common-prefix.cpp), [python3](./leetcode/14.longest-common-prefix.py)| Other |\-|\-| - |
982
982
|[Leetcode-687](https://leetcode.com/problems/longest-univalue-path/)| Longest Univalue Path |[c++](./leetcode/687.longest-univalue-path.cpp), [python3](./leetcode/687.longest-univalue-path.py)| Other |\-|\-| - |
983
983
|[Leetcode-229](https://leetcode.com/problems/majority-element-ii/)| Majority Element II |[c++](./leetcode/229.majority-element-ii.cpp), [python3](./leetcode/229.majority-element-ii.py)| Other |\-|\-| - |
// Suppose we have a file system that stores both files and directories. An example of one system is represented in the following picture:
8
+
//
9
+
// Here, we have dir as the only directory in the root. dir contains two subdirectories, subdir1 and subdir2. subdir1 contains a file file1.ext and subdirectory subsubdir1. subdir2 contains a subdirectory subsubdir2, which contains a file file2.ext.
10
+
// In text form, it looks like this (with ⟶ representing the tab character):
11
+
//
12
+
// dir
13
+
// ⟶ subdir1
14
+
// ⟶ ⟶ file1.ext
15
+
// ⟶ ⟶ subsubdir1
16
+
// ⟶ subdir2
17
+
// ⟶ ⟶ subsubdir2
18
+
// ⟶ ⟶ ⟶ file2.ext
19
+
//
20
+
// If we were to write this representation in code, it will look like this: "dir\n\tsubdir1\n\t\tfile1.ext\n\t\tsubsubdir1\n\tsubdir2\n\t\tsubsubdir2\n\t\t\tfile2.ext". Note that the '\n' and '\t' are the new-line and tab characters.
21
+
// Every file and directory has a unique absolute path in the file system, which is the order of directories that must be opened to reach the file/directory itself, all concatenated by '/'s. Using the above example, the absolute path to file2.ext is "dir/subdir2/subsubdir2/file2.ext". Each directory name consists of letters, digits, and/or spaces. Each file name is of the form name.extension, where name and extension consist of letters, digits, and/or spaces.
22
+
// Given a string input representing the file system in the explained format, return the length of the longest absolute path to a file in the abstracted file system. If there is no file in the system, return 0.
23
+
// Note that the testcases are generated such that the file system is valid and no file or directory name has length 0.
0 commit comments