@rjtsdl Of course not. We aren't talking about integer division, we are talking about float division as written in the problem statement "Given a list of positive integers, the adjacent integers will perform the float division" .
def optimalDivision(self, nums):
:type nums: List[int]
A = map(str, nums)
if len(A) <= 2:
return A + '/(' + '/'.join(A[1:]) + ')'
To get the largest result, the numerator has to be as large as possible, while the denominator has to be as small as possible. I just can't think of a case where A[1:] get's any smaller with a different division order instead of the default "one by one" order.