← All problemsSign in

2264. Largest 3-Same-Digit Number in String

LeetCodeStringOpen on judge ↗

You are given a string num representing a large integer. An integer is good if it meets the following conditions: - It is a substring of num with length 3. - It consists of only one unique digit. Return the maximum good integer as a string or an empty string "" if no such integer exists. Note: - A substring is a contiguous sequence of characters within a string. - There may be leading zeroes

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start