Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 997 Bytes

File metadata and controls

48 lines (31 loc) · 997 Bytes

中文文档

Description

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

Write a function to determine if a number is strobogrammatic. The number is represented as a string.

 

Example 1:

Input: num = "69"
Output: true

Example 2:

Input: num = "88"
Output: true

Example 3:

Input: num = "962"
Output: false

Example 4:

Input: num = "1"
Output: true

Solutions

Python3

Java

...