Given a signed 32-bit integer num, return num with its digits reversed. If reversing num causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.
Input: num = 478
Output: 874
Input: num = -2001
Output: -1002
Input: num = 120
Output: 21