You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is nothing specifying that the input i32 are signed. If the solution considers them unsigned, the only non-natural number is 0. It would be reasonable to return 0 (or a negative to report error) in this case.
We can consider error checking to be out of scope for this exercise. There are already large i32 values that can't give valid results as the results would not fit in an i32. We are not asking students to detect and reject these values.
The difference of squares spec should validate that the parameter is a natural number. It should be sufficient to return -1 in case of error.
The text was updated successfully, but these errors were encountered: