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.
For example,
Given n = 2, return
Given n = 2, return
["11","69","88","96"]
.
Hint:
- Try to use recursion and notice that it should recurse with n - 2 instead of n - 1.
=======
1. https://discuss.leetcode.com/topic/39776/concise-and-simple-c-solution-with-explaination
2. http://www.cnblogs.com/grandyang/p/5200919.html
No comments:
Post a Comment