Skip to content

Files

Latest commit

author
Shuo
Nov 27, 2021
cb30580 · Nov 27, 2021

History

History

strobogrammatic-number-ii

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 27, 2021
Nov 12, 2019
Nov 12, 2019

< Previous                  Next >

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

Find all strobogrammatic numbers that are of length = n.

Example:

Input:  n = 2
Output: ["11","69","88","96"]

Related Topics

[Array] [String] [Recursion]

Similar Questions

  1. Strobogrammatic Number (Easy)
  2. Strobogrammatic Number III (Hard)
  3. Sum of k-Mirror Numbers (Hard)

Hints

Hint 1 Try to use recursion and notice that it should recurse with n - 2 instead of n - 1.