Problem 1903 · Easy

Largest Odd Number in String

Return the largest odd-valued substring of a decimal string, which is the longest prefix ending at its last odd digit. The visual scans from the right to the first odd digit and highlights the prefix that ends there.

Open the interactive visualisation