Readable Numbers — Solution & Editorial
Process the decimal string from the right in blocks of three (or repeatedly divmod by 1000).
Complexity: O(digits)
Process the decimal string from the right in blocks of three (or repeatedly divmod by 1000).
Complexity: O(digits)