insert ,update 以及merge 的使用例子
分类:
其他好文 时间:
2014-05-16 05:03:57
阅读次数:
307
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3681
E - Cup 2
Time Limit: 2 Seconds Memory Limit: 65536 KB
The European Cup final is coming. The past two World C...
分类:
其他好文 时间:
2014-05-15 14:56:27
阅读次数:
393
1. synchronized
If two threads are using the same function( here we use output to print out string) of another instance, if we want to make sure that these two threads are not disturbing each other.
...
分类:
其他好文 时间:
2014-05-15 11:14:14
阅读次数:
389
创建表:
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
题意:从一个已排序的数组中移除掉重复的元素
思路:用下标i扫描旧数组,用下标j来保存新数组的尾部
如果旧数组的当前元素与新数组的最后一个元素相同,则继续扫描旧数组
如果不同,新数组的下标前移一们,将旧数组的当前元素赋给新数组,继续扫描旧数组
相关题目:
Remove Element
Remove Duplicates from Sorted List
Remove Duplicates from Sorted List II...
分类:
其他好文 时间:
2014-05-15 06:57:53
阅读次数:
249
题意:去掉已排序的链表里重复的元素
思路:
1.遍历链表,用一个变量保存当前链表节点的值
2.如果当前链表节点值与前面的一样,则删除当前链表节点
3.否则用当前节点值更新该变量
复杂度:时间O(n), 空间O(1)...
分类:
其他好文 时间:
2014-05-15 06:46:24
阅读次数:
218
【题目】
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Out...
分类:
其他好文 时间:
2014-05-15 05:13:49
阅读次数:
306
leetCode-002 Median of Two Sorted Arrays
【题目】
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
【题意】
有两个有序的数组,找出这两数组整合后的中位数,要求时间复杂度O(nlogn)...
分类:
其他好文 时间:
2014-05-15 04:42:05
阅读次数:
274
题目
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
包含三个文件:jsp_include.jsp, static.html, two.jsp
环境:tomcat7.0, myeclipse10
1.jsp_include.jsp
goto two-->
this examples show include works
'/>
'/>
2.static.html...
分类:
Web程序 时间:
2014-05-14 14:27:53
阅读次数:
334