Strobogrammatic Number
Try to solve the Strobogrammatic Number problem.
We'll cover the following
Statement
Given a string num
representing an integer, determine whether it is a strobogrammatic number. Return TRUE if the number is strobogrammatic or FALSE if it is not.
Note: A strobogrammatic number appears the same when rotated
degrees (viewed upside down). For example, “69” is strobogrammatic because it looks the same when flipped upside down, while “962” is not.
Constraints:
num.length
num
contains only digits.num
has no leading zeros except when the number itself is zero.
Examples
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.