Search
⌘K

Leetcode 972. Equal Rational Numbers

Given two decimal strings that may include a repeating part in parentheses, determine whether they represent the same rational number (handling edge cases like 0.9(9) = 1). Parse the integer, non-repeating, and repeating parts and compare their canonical rational (fractional) forms to check equality.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.