ribana-b/push_swap

Infinite loop when calculating the average when the numbers are really big

SrVariable opened this issue · 1 comments

While evaluating a push_swap I realized that I had a bug when calculating the average because it'd overflow the sum if the numbers are really big.
I think it can be solved by using a long (or even long long) instead of int to get the sum.