Skip to content

Files

Latest commit

author
Shuo
Feb 16, 2022
ce6b544 · Feb 16, 2022

History

History

strobogrammatic-number

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 16, 2022
Nov 12, 2019
Nov 12, 2019

README.md

< Previous                  Next >

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:  "69"
Output: true

Example 2:

Input:  "88"
Output: true

Example 3:

Input:  "962"
Output: false

Related Topics

[Hash Table] [Two Pointers] [String]

Similar Questions

  1. Strobogrammatic Number II (Medium)
  2. Strobogrammatic Number III (Hard)
  3. Confusing Number (Easy)