Domanda di colloquio di Glitch

Implement a function that takes in two unsigned integers and returns a boolean indicating whether you will have overflow if they are added together. Language of your choice.

Risposta di colloquio

Anonimo

31 ott 2012

if( a + b < a ) return true; return false;