Goldman Sachs logoGoldman Sachs
Coding·60 minMembers

Longest Substring of All Same Letter

Members only

Given a string, return the length of the longest contiguous substring consisting of a single repeated character. A simple linear-scan warm-up in VP-level phone screens.

SWE
string
two-pointer
easy
Frequency
Single report
Last asked
2024-11-21
Stage
phone-screen

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...