View Single Post
Old 31 May 2021, 14:31   #17
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
Quote:
Originally Posted by robinsonb5 View Post
OK this one works, I think:
No, it does not .

EDIT:
The problem with your algorithm is that in any case (for both the addition and the subtraction) you are doing it on signed values, while what you are asked to do is to do it for unsigned values.
That's why in my algorithm I have to first change it, if needed, for both, and then make a comparison.

Last edited by ross; 31 May 2021 at 14:58.
ross is offline  
 
Page generated in 0.04354 seconds with 11 queries