129. BigDecimal Division
Share
medium - accepted / - tried
This is a follow-up on 126. BigDecimal addition
In this problem, you are asked to implement the division of two decimals with arbitrary digits.
divide( '100000000000000.1', '-0.001')// '-100000000000000100'divide( '-0.123', '-0.00971')// '12.66735324407826982492'
- This problem covers 115. implement BigInt division.
- trailing zeroes in the result should be removed.
- return the result with max 20 digit fraction part, rest be truncated.