var 前往下载 = " http://icourse8.com/Nodejs_qiyeWeb.html ";第1章 课程内容介绍
第2章 NodeJS 是什么,为什么偏爱NodeJS?
第3章 环境 & 调试
第4章 NodeJS 基础 API
第5章 项目初始化
第6章 案例项目--静态资源服务器
第7章 本地构建
第8章 单元测试 & UI 测试
第9章 UI 测试常用工具
第10章 案例项目--headless 爬虫
第11章 课程总结
class Solution {
public boolean isPalindrome(int x) {
if (x < 0)
return false;
int nums = 0;
int temp = x;
int left, right;
while (temp != 0) {
temp /= 10;
nums++;
}
left = nums - 1;
right = 0;
while (left > right) {
if (getDigit(x, left--) != getDigit(x, right++))
return false;
}
return true;
}
private int getDigit(int x, int i) {
x = x / (int)Math.pow(10, i);
return x % 10;
}
}