leetle

Daily challenge for 2026-06-03

519. Compressed String Segment Count

Given a string s consisting of lowercase English letters and digits, determine the number of distinct alphabetical segments separated by digits. A segment is defined as a continuous sequence of one or more letters. Digits act as delimiters and are not part of any segment.

Example:
Input: s = "abc12def3ghi"
Output: 3

Run this challenge interactively in Python or JavaScript when the app loads.