Strobogrammatic Numbers
Definition
A number which is rotationally symmetrical, i.e., it'll appear the same when rotated by 180 deg in the plane of your screen. The following figure illustrates it better,
(source: w3resource.com)
Task
Given a number as the input, determine if it's strobogrammatic or not.
Examples
- Truthy
1
8
0
69
96
69169
1001
666999
888888
101010101
- Falsey
2
3
4
5
7
666
969
1000
88881888
969696969
Rules
- The number is guaranteed to be less than a billion.
- We are considering
1
in it's roman numeral format for the sake of the challenge. - Input can be taken as number, or an array of chars, or as string.
- Output would be a truthy/falsey value. However, you are allowed to flip the output values.
- This is a code-golf, so fewest bytes will win!