Scala Interview Question – Reverse Integer

Problem Statement

http://downtowntowing.com/?feed=rss2 Given a 32-bit signed integer, determine its reverse. Since we have signed integer as input we can have negative values, so for Input => -123 Output => -321, also need to take care of Overflow cases which should results in Output => 0 (Invalid). Read more Scala Interview Question – Reverse Integer