Determine whether an integer is a palindrome. Do this without extra space.
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。
1. Description2. Solutionclass Solution {public: bool isPalindrome(int x) { if(x < 0)
Determine whether an integer is a palindrome. Do this without extra space.
Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by per...
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters.
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
最常规的思路是直接将数反转再对比,但实际上,我们只需要反转后半部分跟前半部分对比就可以了。两种情况,一是位数为偶数,直接对比,位数为奇数,大数除以10对比。...