Leetcode Week6
来源:互联网 发布:儿童桌面软件 编辑:程序博客网 时间:2024/05/16 07:11
/*
4.判断整数是否是回文(Determine whether an integer is a palindrome. Do this without extra space.)
,即从前面往后面读与从后面往前面读是一样的,例:12321;
*/
/*
class Solution {
public:
bool isPalindrome(int x) {
if(x<0){
return 0;
}else if(x==0){
return 1;
}
if(x == reverse(x)){
return 1;
}else{
return 0;
}
}
int reverse(int x){
int res=0;
while(x>0){
res = res*10 + x%10;
x /= 10;
}
return res;
}
};
*/
4.判断整数是否是回文(Determine whether an integer is a palindrome. Do this without extra space.)
,即从前面往后面读与从后面往前面读是一样的,例:12321;
*/
/*
class Solution {
public:
bool isPalindrome(int x) {
if(x<0){
return 0;
}else if(x==0){
return 1;
}
if(x == reverse(x)){
return 1;
}else{
return 0;
}
}
int reverse(int x){
int res=0;
while(x>0){
res = res*10 + x%10;
x /= 10;
}
return res;
}
};
*/
0 0
- Leetcode Week6
- leetcode week6
- leetcode-month2-week6
- LeetCode#46 Permutations (week6)
- LeetCode题解 week6
- week6
- LeetCode 题解(Week6):300. Longest Increasing Subsequence
- Leetcode: 133. Clone Graph(Week6, Medium)
- [leetcode 513. Find Bottom Left Tree Value]medium | week6
- 算法设计Week6 LeetCode Algorithms Problem #455 Assign Cookies
- [LeetCode-Algorithms-10] "Regular Expression Matching" (2017.10.12-WEEK6)
- week6-leetcode #17-Letter-Combinations-of-a-Phone-Number
- algorithm week6
- week6 练习
- WEEK6 作业
- 作业 week6
- week6 作业
- Week6作业
- python3学习笔记:生成器generator
- 教你彻底学会动态规划——进阶篇
- 使用sqlite3 模块操作sqlite3数据库
- HTTPS
- 面试题之进程间通信问题
- Leetcode Week6
- 百度面试题——01排序
- leetcode解题报告7. Reverse Integer
- 分析实时嵌入式系统软件调试问题
- HDU 2647:Reward
- numpy模块笔记之linspace
- Tomcat安装后出现the JRE_HOME environment variable is not defined correctly
- 循环依赖 导致 registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregist
- Drools 之 KieModule 版本管理