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
No.1
Input: n = 2,
Output: [“11”,”69”,”88”,”96”]
No.2
Input: n = 1,
Output: [“0”,”1”,”8”]
Code
1 | public List<String> findStrobogrammatic(int n) { |