Skip to content

Commit 4396aa5

Browse files
refactor 988
1 parent 430a326 commit 4396aa5

File tree

1 file changed

+0
-25
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-25
lines changed

src/main/java/com/fishercoder/solutions/_988.java

-25
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@
88
import java.util.List;
99
import java.util.Map;
1010

11-
/**
12-
* 988. Smallest String Starting From Leaf
13-
*
14-
* Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to 'z':
15-
* a value of 0 represents 'a', a value of 1 represents 'b', and so on.
16-
* Find the lexicographically smallest string that starts at a leaf of this tree and ends at the root.
17-
* (As a reminder, any shorter prefix of a string is lexicographically smaller: for example, "ab" is lexicographically smaller than "aba".
18-
* A leaf of a node is a node that has no children.)
19-
*
20-
* Example 1:
21-
* Input: [0,1,2,3,4,3,4]
22-
* Output: "dba"
23-
*
24-
* Example 2:
25-
* Input: [25,1,3,1,3,0,2]
26-
* Output: "adz"
27-
*
28-
* Example 3:
29-
* Input: [2,2,1,null,1,0,null,0]
30-
* Output: "abc"
31-
*
32-
* Note:
33-
* The number of nodes in the given tree will be between 1 and 8500.
34-
* Each node in the tree will have a value between 0 and 25.
35-
* */
3611
public class _988 {
3712
public static class Solution1 {
3813
public String smallestFromLeaf(TreeNode root) {

0 commit comments

Comments
 (0)