> For the complete documentation index, see [llms.txt](https://jaywin.gitbook.io/leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jaywin.gitbook.io/leetcode/solutions/0744-find-smallest-letter-greater-than-target.md).

# 0744. Find Smallest Letter Greater Than Target

<https://leetcode.com/problems/find-smallest-letter-greater-than-target>

## Description

Given a characters array `letters` that is sorted in **non-decreasing** order and a character `target`, return *the smallest character in the array that is larger than* `target`.

**Note** that the letters wrap around.

* For example, if `target == 'z'` and `letters == ['a', 'b']`, the answer is `'a'`.

**Example 1:**

```
**Input:** letters = ["c","f","j"], target = "a"
**Output:** "c"
```

**Example 2:**

```
**Input:** letters = ["c","f","j"], target = "c"
**Output:** "f"
```

**Example 3:**

```
**Input:** letters = ["c","f","j"], target = "d"
**Output:** "f"
```

**Example 4:**

```
**Input:** letters = ["c","f","j"], target = "g"
**Output:** "j"
```

**Example 5:**

```
**Input:** letters = ["c","f","j"], target = "j"
**Output:** "c"
```

**Constraints:**

* `2 <= letters.length <= 104`
* `letters[i]` is a lowercase English letter.
* `letters` is sorted in **non-decreasing** order.
* `letters` contains at least two different characters.
* `target` is a lowercase English letter.

## ac

```java
```
