# Question

Formatted question description: https://leetcode.ca/all/246.html

 246	Strobogrammatic Number

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

Write a function to determine if a number is strobogrammatic. The number is represented as a string.

Example 1:

Input:  "69"
Output: true
Example 2:

Input:  "88"
Output: true
Example 3:

Input:  "962"
Output: false

@tag-string


# Algorithm

There are actually few numbers that meet this condition, only 0,1,8,6,9.

This question can actually be regarded as a special case of finding the number of palindromes, or use double pointers to detect it.

• If the first and last two numbers are equal, only if they are one of 0,1,8,
• If they are not equal, one is 6 and the other is 9, or one is 9 and the other is 6.
• All other cases return false

Java