Determine whether an integer is a palindrome. Do this without extra space....
分类:
其他好文 时间:
2014-05-15 14:38:59
阅读次数:
278
创建表:
hive> CREATE TABLE pokes (foo INT, bar STRING);
Creates a table called pokes with two columns, the first being an integer and the other a string
创建一个新表,结构与其他一样
hive> create table n...
分类:
其他好文 时间:
2014-05-15 07:07:58
阅读次数:
303
要求最小的步数,是不是很容易想到用dp啊?
我一开始的做法是,当找到了一个可以从它延伸到更远的位置,就把这个位置和最远位置的步数都更新一下,结果超时了。其实这样不仅是超时的,而且是错误的。因为这段距离里的很多点,其实是上一步就能到达的。其实应该更新的只有哪些新的能够到达的点,那哪些点是新的能到达的点呢?假设这次能够延伸更远的点是i,它的前进步数是A[i],上一次能够到达的最远的点是mmax,那新...
分类:
其他好文 时间:
2014-05-15 05:54:41
阅读次数:
229
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
Notes: It is intended for this problem to be specifi...
分类:
其他好文 时间:
2014-05-15 05:00:50
阅读次数:
229
题目
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.The first integer...
分类:
其他好文 时间:
2014-05-15 03:41:11
阅读次数:
257
一、先搭建好struts2,可以通过myeclipse快速搭建。
二、再导入extjs所需的库文件。
三、写一个实体类User
package com.ext.model;
public class User {
private Integer id;
private String username;
private String password;
public Integer...
分类:
Web程序 时间:
2014-05-15 03:14:40
阅读次数:
471
Integer to Roman 罗马数字的转换...
分类:
其他好文 时间:
2014-05-14 21:40:53
阅读次数:
268
题目:brick game是有一些连续编号的木块1~N,再给你一个若干整数构成的集合S;
两个人轮流取出集合S中存在的任意数字个木块,最后取走的人获胜,如果不能取,则对方获胜。
现在,给你一个游戏结果的序列串T,如果木块有k个,可能赢就是T[k] = W,一定输就是T[k] = L。
请你确定一个最小的集合,使得这个序列...
分类:
其他好文 时间:
2014-05-14 15:19:17
阅读次数:
270
Java中很多class都是immutable,像String,Integer等,它们通常用来作为Map的key.
分类:
编程语言 时间:
2014-05-14 11:40:34
阅读次数:
227
-- 创建数据表,定义存储数据信息表的结构--CREATE TABLE T_Student (name
text, age integer, phoneNo text);--
删除数据表,通常在不需要使用某一个表的时候,才会用到,日常开发中极少会用到此命令--DROP TABLE T_Student...
分类:
移动开发 时间:
2014-05-14 11:20:03
阅读次数:
395