Posts

Showing posts from March, 2019

Career Advice

Career advice:‬ ‪1 you are not your job‬ ‪2 I can > IQ‬ ‪3 do not speak poorly about others‬ ‪4 there is no career ladder‬; lift others and you become the ladder ‪5 know when it is time to leave‬ ‪6 you do not need a title to lead‬ ‪7 always meet deadlines‬ ‪8 deliver outside of your job description‬ ‪9 stay teachable‬ ‪10 share the credit‬

Leetcode Strobogrammatic Number

[LeetCode] 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 This question defines a symmetrical number, that is, a number is rotated 180 degrees as the original, that is, it is the same as the reverse, such as 609, the reverse is still 609, etc. There are actually few numbers that satisfy this condition, only 0, 1, 8, 6, 9. This question can actually be regarded as a special case of seeking the number of replies. We still use double pointers to detect, so if the first and last two numbers are equal, then only one of them is 0,1,8, if If they are not equal, one must be 6 and one is 9, or one is 9 and one is 6, and all other cases...