Implement a method to parse a string into an integer. Detect overflow.
Anonimo
Protip: if asked something like this, don't use a regular expression or something sassy like Integer.parseInt(...). It will not impress your interviewer. The parsing part is easy, overflow detection is a little more tricky.