Given a string s representing a coordinate pair where all commas, spaces, and decimal points have been removed, return a list of all possible valid original coordinate strings formatted as "(x, y)".
To reconstruct the original coordinate:
The digits enclosed inside the parentheses of s must be split into two non empty parts representing x and y.
A decimal point may optionally be inserted into x and y.
If a decimal point is used, at least
A valid number cannot have unnecessary leading zeroes (for instance, "0", "0.5", and "3" are valid, whereas "00", "01", and "00.5" are invalid).
A valid number with a decimal point cannot end with trailing zeroes (for instance, "0.5" and "1.23" are valid, whereas "1.0" and "1.20" are invalid).
The returned list can be in any order.
Constraints:
s.length
s[0] == '(' and s[s.length - 1] == ')'
The rest of s are digits.
Given a string s representing a coordinate pair where all commas, spaces, and decimal points have been removed, return a list of all possible valid original coordinate strings formatted as "(x, y)".
To reconstruct the original coordinate:
The digits enclosed inside the parentheses of s must be split into two non empty parts representing x and y.
A decimal point may optionally be inserted into x and y.
If a decimal point is used, at least
A valid number cannot have unnecessary leading zeroes (for instance, "0", "0.5", and "3" are valid, whereas "00", "01", and "00.5" are invalid).
A valid number with a decimal point cannot end with trailing zeroes (for instance, "0.5" and "1.23" are valid, whereas "1.0" and "1.20" are invalid).
The returned list can be in any order.
Constraints:
s.length
s[0] == '(' and s[s.length - 1] == ')'
The rest of s are digits.