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
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console