bowang0911/leetcode huggingface dataset:
Put Boxes Into the Warehouse II

You are given two arrays of positive integers, `boxes` and `warehouse`, representing the heights of some boxes of unit width and the heights of `n` rooms in a warehouse respectively. The warehouse's rooms are labeled from `0` to `n - 1` from left to right where `warehouse[i]` (0-indexed) is the height of the `ith` room.

Boxes are put into the warehouse by the following rules:

*   Boxes cannot be stacked.
*   You can rearrange the insertion order of the boxes.
*   Boxes can be pushed into the warehouse from **either side** (left or right)
*   If the height of some room in the warehouse is less than the height of a box, then that box and all other boxes behind it will be stopped before that room.

Return _the maximum number of boxes you can put into the warehouse._

**Example 1:**

**Input:** boxes = \[1,2,2,3,4\], warehouse = \[3,4,1,2\]
**Output:** 4
**Explanation:**
 
We can store the boxes in the following order:
1- Put the yellow box in room 2 from either the left or right side.
2- Put the orange box in room 3 from the right side.
3- Put the green box in room 1 from the left side.
4- Put the red box in room 0 from the left side.
Notice that there are other valid ways to put 4 boxes such as swapping the red and green boxes or the red and orange boxes.

**Example 2:**

**Input:** boxes = \[3,5,5,2\], warehouse = \[2,1,3,4,5\]
**Output:** 3
**Explanation:**
 
It is not possible to put the two boxes of height 5 in the warehouse since there's only 1 room of height >= 5.
Other valid solutions are to put the green box in room 2 or to put the orange box first in room 2 before putting the green and red boxes.

**Constraints:**

*   `n == warehouse.length`
*   `1 <= boxes.length, warehouse.length <= 105`
*   `1 <= boxes[i], warehouse[i] <= 109`
Special Positions in a Binary Matrix

Given an `m x n` binary matrix `mat`, return _the number of special positions in_ `mat`_._

A position `(i, j)` is called **special** if `mat[i][j] == 1` and all other elements in row `i` and column `j` are `0` (rows and columns are **0-indexed**).

**Example 1:**

**Input:** mat = \[\[1,0,0\],\[0,0,1\],\[1,0,0\]\]
**Output:** 1
**Explanation:** (1, 2) is a special position because mat\[1\]\[2\] == 1 and all other elements in row 1 and column 2 are 0.

**Example 2:**

**Input:** mat = \[\[1,0,0\],\[0,1,0\],\[0,0,1\]\]
**Output:** 3
**Explanation:** (0, 0), (1, 1) and (2, 2) are special positions.

**Constraints:**

*   `m == mat.length`
*   `n == mat[i].length`
*   `1 <= m, n <= 100`
*   `mat[i][j]` is either `0` or `1`.
Count Unhappy Friends

You are given a list of `preferences` for `n` friends, where `n` is always **even**.

For each person `i`, `preferences[i]` contains a list of friends **sorted** in the **order of preference**. In other words, a friend earlier in the list is more preferred than a friend later in the list. Friends in each list are denoted by integers from `0` to `n-1`.

All the friends are divided into pairs. The pairings are given in a list `pairs`, where `pairs[i] = [xi, yi]` denotes `xi` is paired with `yi` and `yi` is paired with `xi`.

However, this pairing may cause some of the friends to be unhappy. A friend `x` is unhappy if `x` is paired with `y` and there exists a friend `u` who is paired with `v` but:

*   `x` prefers `u` over `y`, and
*   `u` prefers `x` over `v`.

Return _the number of unhappy friends_.

**Example 1:**

**Input:** n = 4, preferences = \[\[1, 2, 3\], \[3, 2, 0\], \[3, 1, 0\], \[1, 2, 0\]\], pairs = \[\[0, 1\], \[2, 3\]\]
**Output:** 2
**Explanation:**
Friend 1 is unhappy because:
- 1 is paired with 0 but prefers 3 over 0, and
- 3 prefers 1 over 2.
Friend 3 is unhappy because:
- 3 is paired with 2 but prefers 1 over 2, and
- 1 prefers 3 over 0.
Friends 0 and 2 are happy.

**Example 2:**

**Input:** n = 2, preferences = \[\[1\], \[0\]\], pairs = \[\[1, 0\]\]
**Output:** 0
**Explanation:** Both friends 0 and 1 are happy.

**Example 3:**

**Input:** n = 4, preferences = \[\[1, 3, 2\], \[2, 3, 0\], \[1, 3, 0\], \[0, 2, 1\]\], pairs = \[\[1, 3\], \[0, 2\]\]
**Output:** 4

**Constraints:**

*   `2 <= n <= 500`
*   `n` is even.
*   `preferences.length == n`
*   `preferences[i].length == n - 1`
*   `0 <= preferences[i][j] <= n - 1`
*   `preferences[i]` does not contain `i`.
*   All values in `preferences[i]` are unique.
*   `pairs.length == n/2`
*   `pairs[i].length == 2`
*   `xi != yi`
*   `0 <= xi, yi <= n - 1`
*   Each person is contained in **exactly one** pair.
Min Cost to Connect All Points

You are given an array `points` representing integer coordinates of some points on a 2D-plane, where `points[i] = [xi, yi]`.

The cost of connecting two points `[xi, yi]` and `[xj, yj]` is the **manhattan distance** between them: `|xi - xj| + |yi - yj|`, where `|val|` denotes the absolute value of `val`.

Return _the minimum cost to make all points connected._ All points are connected if there is **exactly one** simple path between any two points.

**Example 1:**

**Input:** points = \[\[0,0\],\[2,2\],\[3,10\],\[5,2\],\[7,0\]\]
**Output:** 20
**Explanation:** 
 
We can connect the points as shown above to get the minimum cost of 20.
Notice that there is a unique path between every pair of points.

**Example 2:**

**Input:** points = \[\[3,12\],\[-2,5\],\[-4,1\]\]
**Output:** 18

**Constraints:**

*   `1 <= points.length <= 1000`
*   `-106 <= xi, yi <= 106`
*   All pairs `(xi, yi)` are distinct.
Check If String Is Transformable With Substring Sort Operations

Given two strings `s` and `t`, transform string `s` into string `t` using the following operation any number of times:

*   Choose a **non-empty** substring in `s` and sort it in place so the characters are in **ascending order**.
    *   For example, applying the operation on the underlined substring in `"14234 "` results in `"12344 "`.

Return `true` if _it is possible to transform `s` into `t`_. Otherwise, return `false`.

A **substring** is a contiguous sequence of characters within a string.

**Example 1:**

**Input:** s =  "84532 ", t =  "34852 "
**Output:** true
**Explanation:** You can transform s into t using the following sort operations:
 "84532 " (from index 2 to 3) ->  "84352 "
 "84352 " (from index 0 to 2) ->  "34852 "

**Example 2:**

**Input:** s =  "34521 ", t =  "23415 "
**Output:** true
**Explanation:** You can transform s into t using the following sort operations:
 "34521 " ->  "23451 "
 "23451 " ->  "23415 "

**Example 3:**

**Input:** s =  "12345 ", t =  "12435 "
**Output:** false

**Constraints:**

*   `s.length == t.length`
*   `1 <= s.length <= 105`
*   `s` and `t` consist of only digits.
Binary Search Tree Iterator II

Implement the `BSTIterator` class that represents an iterator over the **[in-order traversal](https://en.wikipedia.org/wiki/Tree_traversal#In-order_(LNR))** of a binary search tree (BST):

*   `BSTIterator(TreeNode root)` Initializes an object of the `BSTIterator` class. The `root` of the BST is given as part of the constructor. The pointer should be initialized to a non-existent number smaller than any element in the BST.
*   `boolean hasNext()` Returns `true` if there exists a number in the traversal to the right of the pointer, otherwise returns `false`.
*   `int next()` Moves the pointer to the right, then returns the number at the pointer.
*   `boolean hasPrev()` Returns `true` if there exists a number in the traversal to the left of the pointer, otherwise returns `false`.
*   `int prev()` Moves the pointer to the left, then returns the number at the pointer.

Notice that by initializing the pointer to a non-existent smallest number, the first call to `next()` will return the smallest element in the BST.

You may assume that `next()` and `prev()` calls will always be valid. That is, there will be at least a next/previous number in the in-order traversal when `next()`/`prev()` is called.

**Example 1:**

**Input**
\[ "BSTIterator ",  "next ",  "next ",  "prev ",  "next ",  "hasNext ",  "next ",  "next ",  "next ",  "hasNext ",  "hasPrev ",  "prev ",  "prev "\]
\[\[\[7, 3, 15, null, null, 9, 20\]\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\], \[null\]\]
**Output**
\[null, 3, 7, 3, 7, true, 9, 15, 20, false, true, 15, 9\]

**Explanation**
// The underlined element is where the pointer currently is.
BSTIterator bSTIterator = new BSTIterator(\[7, 3, 15, null, null, 9, 20\]); // state is  \[3, 7, 9, 15, 20\]
bSTIterator.next(); // state becomes \[3, 7, 9, 15, 20\], return 3
bSTIterator.next(); // state becomes \[3, 7, 9, 15, 20\], return 7
bSTIterator.prev(); // state becomes \[3, 7, 9, 15, 20\], return 3
bSTIterator.next(); // state becomes \[3, 7, 9, 15, 20\], return 7
bSTIterator.hasNext(); // return true
bSTIterator.next(); // state becomes \[3, 7, 9, 15, 20\], return 9
bSTIterator.next(); // state becomes \[3, 7, 9, 15, 20\], return 15
bSTIterator.next(); // state becomes \[3, 7, 9, 15, 20\], return 20
bSTIterator.hasNext(); // return false
bSTIterator.hasPrev(); // return true
bSTIterator.prev(); // state becomes \[3, 7, 9, 15, 20\], return 15
bSTIterator.prev(); // state becomes \[3, 7, 9, 15, 20\], return 9

**Constraints:**

*   The number of nodes in the tree is in the range `[1, 105]`.
*   `0 <= Node.val <= 106`
*   At most `105` calls will be made to `hasNext`, `next`, `hasPrev`, and `prev`.

**Follow up:** Could you solve the problem without precalculating the values of the tree?
Sum of All Odd Length Subarrays

Given an array of positive integers `arr`, return _the sum of all possible **odd-length subarrays** of_ `arr`.

A **subarray** is a contiguous subsequence of the array.

**Example 1:**

**Input:** arr = \[1,4,2,5,3\]
**Output:** 58
**Explanation:** The odd-length subarrays of arr and their sums are:
\[1\] = 1
\[4\] = 4
\[2\] = 2
\[5\] = 5
\[3\] = 3
\[1,4,2\] = 7
\[4,2,5\] = 11
\[2,5,3\] = 10
\[1,4,2,5,3\] = 15
If we add all these together we get 1 + 4 + 2 + 5 + 3 + 7 + 11 + 10 + 15 = 58

**Example 2:**

**Input:** arr = \[1,2\]
**Output:** 3
**Explanation:** There are only 2 subarrays of odd length, \[1\] and \[2\]. Their sum is 3.

**Example 3:**

**Input:** arr = \[10,11,12\]
**Output:** 66

**Constraints:**

*   `1 <= arr.length <= 100`
*   `1 <= arr[i] <= 1000`

**Follow up:**

Could you solve this problem in O(n) time complexity?
Maximum Sum Obtained of Any Permutation

We have an array of integers, `nums`, and an array of `requests` where `requests[i] = [starti, endi]`. The `ith` request asks for the sum of `nums[starti] + nums[starti + 1] + ... + nums[endi - 1] + nums[endi]`. Both `starti` and `endi` are _0-indexed_.

Return _the maximum total sum of all requests **among all permutations** of_ `nums`.

Since the answer may be too large, return it **modulo** `109 + 7`.

**Example 1:**

**Input:** nums = \[1,2,3,4,5\], requests = \[\[1,3\],\[0,1\]\]
**Output:** 19
**Explanation:** One permutation of nums is \[2,1,3,4,5\] with the following result: 
requests\[0\] -> nums\[1\] + nums\[2\] + nums\[3\] = 1 + 3 + 4 = 8
requests\[1\] -> nums\[0\] + nums\[1\] = 2 + 1 = 3
Total sum: 8 + 3 = 11.
A permutation with a higher total sum is \[3,5,4,2,1\] with the following result:
requests\[0\] -> nums\[1\] + nums\[2\] + nums\[3\] = 5 + 4 + 2 = 11
requests\[1\] -> nums\[0\] + nums\[1\] = 3 + 5  = 8
Total sum: 11 + 8 = 19, which is the best that you can do.

**Example 2:**

**Input:** nums = \[1,2,3,4,5,6\], requests = \[\[0,1\]\]
**Output:** 11
**Explanation:** A permutation with the max total sum is \[6,5,4,3,2,1\] with request sums \[11\].

**Example 3:**

**Input:** nums = \[1,2,3,4,5,10\], requests = \[\[0,2\],\[1,3\],\[1,1\]\]
**Output:** 47
**Explanation:** A permutation with the max total sum is \[4,10,5,3,2,1\] with request sums \[19,18,10\].

**Constraints:**

*   `n == nums.length`
*   `1 <= n <= 105`
*   `0 <= nums[i] <= 105`
*   `1 <= requests.length <= 105`
*   `requests[i].length == 2`
*   `0 <= starti <= endi < n`
Make Sum Divisible by P

Given an array of positive integers `nums`, remove the **smallest** subarray (possibly **empty**) such that the **sum** of the remaining elements is divisible by `p`. It is **not** allowed to remove the whole array.

Return _the length of the smallest subarray that you need to remove, or_ `-1` _if it's impossible_.

A **subarray** is defined as a contiguous block of elements in the array.

**Example 1:**

**Input:** nums = \[3,1,4,2\], p = 6
**Output:** 1
**Explanation:** The sum of the elements in nums is 10, which is not divisible by 6. We can remove the subarray \[4\], and the sum of the remaining elements is 6, which is divisible by 6.

**Example 2:**

**Input:** nums = \[6,3,5,2\], p = 9
**Output:** 2
**Explanation:** We cannot remove a single element to get a sum divisible by 9. The best way is to remove the subarray \[5,2\], leaving us with \[6,3\] with sum 9.

**Example 3:**

**Input:** nums = \[1,2,3\], p = 3
**Output:** 0
**Explanation:** Here the sum is 6. which is already divisible by 3. Thus we do not need to remove anything.

**Constraints:**

*   `1 <= nums.length <= 105`
*   `1 <= nums[i] <= 109`
*   `1 <= p <= 109`
Strange Printer II

There is a strange printer with the following two special requirements:

*   On each turn, the printer will print a solid rectangular pattern of a single color on the grid. This will cover up the existing colors in the rectangle.
*   Once the printer has used a color for the above operation, **the same color cannot be used again**.

You are given a `m x n` matrix `targetGrid`, where `targetGrid[row][col]` is the color in the position `(row, col)` of the grid.

Return `true` _if it is possible to print the matrix_ `targetGrid`_,_ _otherwise, return_ `false`.

**Example 1:**

**Input:** targetGrid = \[\[1,1,1,1\],\[1,2,2,1\],\[1,2,2,1\],\[1,1,1,1\]\]
**Output:** true

**Example 2:**

**Input:** targetGrid = \[\[1,1,1,1\],\[1,1,3,3\],\[1,1,3,4\],\[5,5,1,4\]\]
**Output:** true

**Example 3:**

**Input:** targetGrid = \[\[1,2,1\],\[2,1,2\],\[1,2,1\]\]
**Output:** false
**Explanation:** It is impossible to form targetGrid because it is not allowed to print the same color in different turns.

**Constraints:**

*   `m == targetGrid.length`
*   `n == targetGrid[i].length`
*   `1 <= m, n <= 60`
*   `1 <= targetGrid[row][col] <= 60`
Rearrange Spaces Between Words

You are given a string `text` of words that are placed among some number of spaces. Each word consists of one or more lowercase English letters and are separated by at least one space. It's guaranteed that `text` **contains at least one word**.

Rearrange the spaces so that there is an **equal** number of spaces between every pair of adjacent words and that number is **maximized**. If you cannot redistribute all the spaces equally, place the **extra spaces at the end**, meaning the returned string should be the same length as `text`.

Return _the string after rearranging the spaces_.

**Example 1:**

**Input:** text =  "  this   is  a sentence  "
**Output:**  "this   is   a   sentence "
**Explanation:** There are a total of 9 spaces and 4 words. We can evenly divide the 9 spaces between the words: 9 / (4-1) = 3 spaces.

**Example 2:**

**Input:** text =  " practice   makes   perfect "
**Output:**  "practice   makes   perfect  "
**Explanation:** There are a total of 7 spaces and 3 words. 7 / (3-1) = 3 spaces plus 1 extra space. We place this extra space at the end of the string.

**Constraints:**

*   `1 <= text.length <= 100`
*   `text` consists of lowercase English letters and `' '`.
*   `text` contains at least one word.
Split a String Into the Max Number of Unique Substrings

Given a string `s`, return _the maximum number of unique substrings that the given string can be split into_.

You can split string `s` into any list of **non-empty substrings**, where the concatenation of the substrings forms the original string. However, you must split the substrings such that all of them are **unique**.

A **substring** is a contiguous sequence of characters within a string.

**Example 1:**

**Input:** s =  "ababccc "
**Output:** 5
**Explanation**: One way to split maximally is \['a', 'b', 'ab', 'c', 'cc'\]. Splitting like \['a', 'b', 'a', 'b', 'c', 'cc'\] is not valid as you have 'a' and 'b' multiple times.

**Example 2:**

**Input:** s =  "aba "
**Output:** 2
**Explanation**: One way to split maximally is \['a', 'ba'\].

**Example 3:**

**Input:** s =  "aa "
**Output:** 1
**Explanation**: It is impossible to split the string any further.

**Constraints:**

*   `1 <= s.length <= 16`
    
*   `s` contains only lower case English letters.
Maximum Non Negative Product in a Matrix

You are given a `m x n` matrix `grid`. Initially, you are located at the top-left corner `(0, 0)`, and in each step, you can only **move right or down** in the matrix.

Among all possible paths starting from the top-left corner `(0, 0)` and ending in the bottom-right corner `(m - 1, n - 1)`, find the path with the **maximum non-negative product**. The product of a path is the product of all integers in the grid cells visited along the path.

Return the _maximum non-negative product **modulo**_ `109 + 7`. _If the maximum product is **negative**, return_ `-1`.

Notice that the modulo is performed after getting the maximum product.

**Example 1:**

**Input:** grid = \[\[-1,-2,-3\],\[-2,-3,-3\],\[-3,-3,-2\]\]
**Output:** -1
**Explanation:** It is not possible to get non-negative product in the path from (0, 0) to (2, 2), so return -1.

**Example 2:**

**Input:** grid = \[\[1,-2,1\],\[1,-2,1\],\[3,-4,1\]\]
**Output:** 8
**Explanation:** Maximum non-negative product is shown (1 \* 1 \* -2 \* -4 \* 1 = 8).

**Example 3:**

**Input:** grid = \[\[1,3\],\[0,-4\]\]
**Output:** 0
**Explanation:** Maximum non-negative product is shown (1 \* 0 \* -4 = 0).

**Constraints:**

*   `m == grid.length`
*   `n == grid[i].length`
*   `1 <= m, n <= 15`
*   `-4 <= grid[i][j] <= 4`
Minimum Cost to Connect Two Groups of Points

You are given two groups of points where the first group has `size1` points, the second group has `size2` points, and `size1 >= size2`.

The `cost` of the connection between any two points are given in an `size1 x size2` matrix where `cost[i][j]` is the cost of connecting point `i` of the first group and point `j` of the second group. The groups are connected if **each point in both groups is connected to one or more points in the opposite group**. In other words, each point in the first group must be connected to at least one point in the second group, and each point in the second group must be connected to at least one point in the first group.

Return _the minimum cost it takes to connect the two groups_.

**Example 1:**

**Input:** cost = \[\[15, 96\], \[36, 2\]\]
**Output:** 17
**Explanation**: The optimal way of connecting the groups is:
1--A
2--B
This results in a total cost of 17.

**Example 2:**

**Input:** cost = \[\[1, 3, 5\], \[4, 1, 1\], \[1, 5, 3\]\]
**Output:** 4
**Explanation**: The optimal way of connecting the groups is:
1--A
2--B
2--C
3--A
This results in a total cost of 4.
Note that there are multiple points connected to point 2 in the first group and point A in the second group. This does not matter as there is no limit to the number of points that can be connected. We only care about the minimum total cost.

**Example 3:**

**Input:** cost = \[\[2, 5, 1\], \[3, 4, 7\], \[8, 1, 2\], \[6, 2, 4\], \[3, 8, 8\]\]
**Output:** 10

**Constraints:**

*   `size1 == cost.length`
*   `size2 == cost[i].length`
*   `1 <= size1, size2 <= 12`
*   `size1 >= size2`
*   `0 <= cost[i][j] <= 100`
Build Binary Expression Tree From Infix Expression

A **[binary expression tree](https://en.wikipedia.org/wiki/Binary_expression_tree)** is a kind of binary tree used to represent arithmetic expressions. Each node of a binary expression tree has either zero or two children. Leaf nodes (nodes with 0 children) correspond to operands (numbers), and internal nodes (nodes with 2 children) correspond to the operators `'+'` (addition), `'-'` (subtraction), `'*'` (multiplication), and `'/'` (division).

For each internal node with operator `o`, the [**infix expression**](https://en.wikipedia.org/wiki/Infix_notation) it represents is `(A o B)`, where `A` is the expression the left subtree represents and `B` is the expression the right subtree represents.

You are given a string `s`, an **infix expression** containing operands, the operators described above, and parentheses `'('` and `')'`.

Return _any valid **binary expression tree**, whose **[in-order traversal](https://en.wikipedia.org/wiki/Tree_traversal#In-order_(LNR))** reproduces_ `s` _after omitting the parenthesis from it._

**Please note that order of operations applies in** `s`**.** That is, expressions in parentheses are evaluated first, and multiplication and division happen before addition and subtraction.

Operands must also appear in the **same order** in both `s` and the in-order traversal of the tree.

**Example 1:**

**Input:** s =  "3\*4-2\*5 "
**Output:** \[-,\*,\*,3,4,2,5\]
**Explanation:** The tree above is the only valid tree whose inorder traversal produces s.

**Example 2:**

**Input:** s =  "2-3/(5\*2)+1 "
**Output:** \[+,-,1,2,/,null,null,null,null,3,\*,null,null,5,2\]
**Explanation:** The inorder traversal of the tree above is 2-3/5\*2+1 which is the same as s without the parenthesis. The tree also produces the correct result and its operands are in the same order as they appear in s.
The tree below is also a valid binary expression tree with the same inorder traversal as s, but it not a valid answer because it does not evaluate to the same value.
 
The third tree below is also not valid. Although it produces the same result and is equivalent to the above trees, its inorder traversal does not produce s and its operands are not in the same order as s.
 

**Example 3:**

**Input:** s =  "1+2+3+4+5 "
**Output:** \[+,+,5,+,4,null,null,+,3,null,null,1,2\]
**Explanation:** The tree \[+,+,5,+,+,null,null,1,2,3,4\] is also one of many other valid trees.

**Constraints:**

*   `1 <= s.length <= 100`
*   `s` consists of digits and the characters `'+'`, `'-'`, `'*'`, and `'/'`.
*   Operands in `s` are **exactly** 1 digit.
*   It is guaranteed that `s` is a valid expression.
Crawler Log Folder

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._

**Example 1:**

**Input:** logs = \[ "d1/ ", "d2/ ", "../ ", "d21/ ", "./ "\]
**Output:** 2
**Explanation:** Use this change folder operation  "../ " 2 times and go back to the main folder.

**Example 2:**

**Input:** logs = \[ "d1/ ", "d2/ ", "./ ", "d3/ ", "../ ", "d31/ "\]
**Output:** 3

**Example 3:**

**Input:** logs = \[ "d1/ ", "../ ", "../ ", "../ "\]
**Output:** 0

**Constraints:**

*   `1 <= logs.length <= 103`
*   `2 <= logs[i].length <= 10`
*   `logs[i]` contains lowercase English letters, digits, `'.'`, and `'/'`.
*   `logs[i]` follows the format described in the statement.
*   Folder names consist of lowercase English letters and digits.