Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.6 KB

File metadata and controls

39 lines (30 loc) · 1.6 KB

< 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.