Size: 703 bytes.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Strobogrammatic Number

[Leetcode 246: Strobogrammatic Number](https://leetcode.com/problems/strobogrammatic-number/)

Given a string `num` which represents an integer, return
`true` _if_ `num` \*is a **strobogrammatic number\***.

A **strobogrammatic number** is a number that looks the same
when rotated `180` degrees (looked at upside down).

---

## Example 1

**Input:**  
`num = "69"`

**Output:**  
`true`

---

## Example 2

**Input:**  
`num = "88"`

**Output:**  
`true`

---

## Example 3

**Input:**  
`num = "962"`

**Output:**  
`false`

---

## Constraints

- `1 <= num.length <= 50`
- `num` consists of only digits.
- `num` does not contain any leading zeros except for zero
  itself.
v0 (commit) © 2025 @p13i.io | Load balancer proxied to: cs-code-viewer-2:8080 in 4ms.