题干:难度:EasyDetermine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:
Input: 121
Output: true
Example 2:
Input: -121
Output: false...
题干:难度:MediumImplement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, star...
题干:难度:EasyGiven a 32-bit signed integer, reverse digits of an integer.Example 1:
Input: 123
Output: 321
Example 2:
Input: -123
Output: -321
Example 3:
Input: 120
Output: 21
Note:Assume we are deali...
题干:难度:MediumThe string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N...
题干:难度:MediumGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example1:
Input: "babad"
Output: "bab"
Note: "aba" is also a valid ans...