Largest 3-Same-Digit Number

Easy
Strings String

Return the largest good substring (3 identical consecutive digits) or empty.

Constraints

3 ≤ len ≤ 1000

Examples

Example 1:
Input: 6777133339
Output: 777
Example 2:
Input: 2300019
Output: 000
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.