Reverse Integer (LeetCode 7)The problem You get a signed 32-bit integer . Return it with its digits reversed…