4 ms·
The example is buggy. In a better version, both the parameter and the returned type should be unsigned. With negative numbers, that don't make sense, the progra
by gabrielblack 8y ago
The example is buggy. In a better version, both the parameter and the returned type should be unsigned. With negative numbers, that don't make sense, the program will crash. I don't think the interviewer will like it written in that way :-)