Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4396aa5

Browse files
refactor 988
1 parent430a326 commit4396aa5

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@
88
importjava.util.List;
99
importjava.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
publicclass_988 {
3712
publicstaticclassSolution1 {
3813
publicStringsmallestFromLeaf(TreeNoderoot) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp