func divide(a int, b int) string {
	remainderIndexMap := make(map[int]int)
	digits := make([]int, 0)

	digit := 0
	remainder := a

	// While we have not seen that digit before
	for !exists(remainderIndexMap, remainder) {
		remainderIndexMap[remainder] = len(digits)

		remainder *= 10
		digit = remainder / b
		remainder = remainder % b
		digits = append(digits, digit)
	}

	repeatingDigitIndex := remainderIndexMap[remainder]
	return concat(digits, repeatingDigitIndex)
}
// divide returns the fraction with repeating parts between paranthesis
divide returns the fraction with repeating parts between paranthesis
// divide returns the fraction with repeating parts between paranthesis
func divide(a int, b int) string {
	remainderIndexMap := make(map[int]int)
	digits := make([]int, 0)
	digit := 0
	remainder := a
	for !exists(remainderIndexMap, remainder) {
		remainderIndexMap[remainder] = len(digits)
		remainder *= 10
		digit = remainder / b
		remainder = remainder % b
		digits = append(digits, digit)
	}
	repeatingDigitIndex := remainderIndexMap[remainder]
	return concat(digits, repeatingDigitIndex)
}
func divide ( a int , b int ) string { remainderIndexMap := make ( map [ int ] int ) digits := make ( [ ] int , 0 ) digit := 0 remainder := a for ! exists ( remainderIndexMap , remainder ) { remainderIndexMap [ remainder ] = len ( digits ) remainder *= 10 digit = remainder / b remainder = remainder % b digits = append ( digits , digit ) } repeatingDigitIndex := remainderIndexMap [ remainder ] return concat ( digits , repeatingDigitIndex ) }
divide returns the fraction with repeating parts between paranthesis
divide returns the fraction with repeating parts between paranthesis
// While we have not seen that digit before