Browser tab content: Problem List 0 Debugging... Run Submit 00:00:00 Description…
- User
Browser tab content: Problem List 0 Debugging... Run Submit 00:00:00 Description Editorial Editorial Solutions Solutions Submissions Submissions Code Note Note Testcase Testcase Test Result 247. Strobogrammatic Number II Medium Topics Companies Hint
Given an integer n, return all the strobogrammatic numbers that are of length n. You may return the answer in any order.
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).
Example 1:
Input: n = 2 Output: ["11","69","88","96"]
Example 2:
Input: n = 1 Output: ["0","1","8"]
Constraints:
1 <= n <= 14 Seen this question in a real interview before? 1/5 Yes No Accepted 145.9K Submissions 277K Acceptance Rate 52.7% Topics Array String Recursion Companies 0 - 6 months Google 3 6 months ago Meta 6 Uber 2 Hint 1 Try to use recursion and notice that it should recurse with n - 2 instead of n - 1. Similar Questions Strobogrammatic Number Easy Strobogrammatic Number III Hard Sum of k-Mirror Numbers Hard Discussion (12) Choose a type Preview Comment 💡 Discussion Rules
-
Please don't post any solutions in this discussion.
-
The problem discussion is for asking questions about the problem or for sharing tips - anything except for solutions.
-
If you'd like to share your solution for feedback and ideas, please head to the solutions tab and post it there.
Sort by:Best No comments yet. 1 2 Copyright ©️ 2024 LeetCode All rights reserved 928 12 Java Auto 1 2 3 4 5 class Solution { public List findStrobogrammatic(int n) { } } Restored from local Ln 1, Col 1 You must run your code first
Strobogrammatic Number II - LeetCode
Problem List Tag 173. Binary Search Tree Iterator
Med.
- Dungeon Game
Hard
- Combine Two Tables
Easy
- Second Highest Salary
Med.
- Nth Highest Salary
Med.
- Rank Scores
Med.
- Largest Number
Med.
- Consecutive Numbers
Med.
- Employees Earning More Than Their Managers
Easy
- Duplicate Emails
Easy
- Customers Who Never Order
Easy
- Department Highest Salary
-
- Assistant
The programming question is as follows:
Strobogrammatic Number II
Problem: Given an integer
n, return all the strobogrammatic numbers that are of lengthn. You may return the answer in any order. A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down).