You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Ad...
题目没有说清楚,trick挺多,考察细心程度的水题吧。 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their n......
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321Easy,没什么好说的注意负数和溢出的情况class Solution {public: int reverse(...
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the he...
Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, repla...
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your fr...