Solution: Equal Rational Numbers
Understand how to determine if two strings represent the same rational number, including those with repeating decimal parts. Explore the method of converting repeating decimals into fractions, reducing them, and comparing for equality, while considering time and space efficiencies.
We'll cover the following...
We'll cover the following...
Statement
Given two strings s and t, each representing a non negative rational number, return true if and only if they represent the same number. The strings may use parentheses to denote the repeating part of the rational number.
A rational number can be represented using up to three parts: <IntegerPart>, <NonRepeatingPart>, and <RepeatingPart>. The number will be expressed in one of the following three formats:
<IntegerPart>For example,
...