Skip to content

Commit 94db29e

Browse files
refactor 744
1 parent 392f4bd commit 94db29e

File tree

1 file changed

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

1 file changed

+0
-42
lines changed

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

-42
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 744. Find Smallest Letter Greater Than Target
5-
*
6-
* Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list that is larger than the given target.
7-
* Letters also wrap around. For example, if the target is target = 'z' and letters = ['a', 'b'], the answer is 'a'.
8-
9-
Examples:
10-
Input:
11-
letters = ["c", "f", "j"]
12-
target = "a"
13-
Output: "c"
14-
15-
Input:
16-
letters = ["c", "f", "j"]
17-
target = "c"
18-
Output: "f"
19-
20-
Input:
21-
letters = ["c", "f", "j"]
22-
target = "d"
23-
Output: "f"
24-
25-
Input:
26-
letters = ["c", "f", "j"]
27-
target = "g"
28-
Output: "j"
29-
30-
Input:
31-
letters = ["c", "f", "j"]
32-
target = "j"
33-
Output: "c"
34-
35-
Input:
36-
letters = ["c", "f", "j"]
37-
target = "k"
38-
Output: "c"
39-
40-
Note:
41-
letters has a length in range [2, 10000].
42-
letters consists of lowercase letters, and contains at least 2 unique letters.
43-
target is a lowercase letter.
44-
*/
453
public class _744 {
464
public static class Solution1 {
475
public char nextGreatestLetter(char[] letters, char target) {

0 commit comments

Comments
 (0)