1、注意空字符串的处理;2、注意是alphanumeric字符;3、字符串添加字符直接用+就可以; 1 class Solution: 2 # @param s, a string 3 # @return a boolean 4 def isPalindrome(self, ...
分类:
其他好文 时间:
2014-10-17 01:34:53
阅读次数:
216
安装完jdk环境后,编写第一个java程序:public class hello{ public static void main (String args []){ System.out.println("hello world!"); }}编译完之后会出现class文件注意:1、public ....
分类:
其他好文 时间:
2014-10-17 00:37:33
阅读次数:
350
// 3SumClosest.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include#include #include using namespace std;class Solution {public: int threeSumClo...
分类:
其他好文 时间:
2014-10-17 00:28:43
阅读次数:
218
1 /* 2 * 求两个数的最大公约数 3 */ 4 5 import java.util.Scanner; 6 7 8 public class Zy4 { 9 public static void main(String[] args) {10 Scanner...
分类:
其他好文 时间:
2014-10-16 23:44:33
阅读次数:
203
/** * 切面类,要将当前类中的方法插入到目标对象的方法 * * @author ASUS * */@Aspect// 表示此类为切面类public class ProxyObj {// // @Before 表示前置通知。目标方法执行前需要调用该方法// // * com.lovo.serv.....
分类:
其他好文 时间:
2014-10-16 23:24:43
阅读次数:
231
package com.lovo;/** * 最大公约数和最小公倍数 * @author 文波 * */import java.util.Scanner;public class Test08 { public static void main(String[] args) { ...
分类:
其他好文 时间:
2014-10-16 23:21:53
阅读次数:
181
SQLiteDatabase和ContentProvider为我们提供一下函数 query()??//查询
insert() //插入
delete()??//删除
update()??//更新
//参数和返回值我没有写 数据库建库升级等原则 private?final?class?Databas...
分类:
移动开发 时间:
2014-10-16 23:20:43
阅读次数:
160
百千白鸡问题 1 package com.lovo; 2 3 public class test12 { 4 public static void main(String[] args) { 5 for (int i = 0; i =1;i--){ if((n%i==0...
分类:
编程语言 时间:
2014-10-16 23:04:43
阅读次数:
257
1 /* 2 * 求1到100之间的质数 3 */ 4 public class Zy3 { 5 public static void main(String[] args) { 6 System.out.print("1到100之间的素数有:\n"+"\t"+1+"\...
分类:
其他好文 时间:
2014-10-16 23:03:13
阅读次数:
186
class{ //--------------------- 初始化 --------------------- //-------------------- 对外接口 -------------------- //---------------------- 私有 -------------...
分类:
其他好文 时间:
2014-10-16 22:28:33
阅读次数:
223