Given two integers, numerator and denominator, return the decimal representation of the fraction numerator/denominator as a string. Examples Simulate long division. Track each remainder’s first index in the fractional string via a hash map. When a remainder repeats, insert parentheses around the substring from its first occurrence to the end. Handle sign, zero integer part,…