代码已亲测,全部通过。创建web service的时候一直报java.lang.ClassNotFoundException: org.jdom.Element这个错误,原因是导入jdom jar包的版本不正确。所用的jar包包括:activation-1.0.2.jarcommons-codec-...
分类:
Web程序 时间:
2014-08-25 14:46:34
阅读次数:
256
Goffi and Median
Problem Description
A median in a sequence with the length of n is an element which occupies position number ?n+12? after we sort the elements in the non-decreasing order ...
分类:
其他好文 时间:
2014-08-25 11:55:34
阅读次数:
159
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.思路:使用两个向量分别记录每一行和每一列是否存在0。 1 class Solution { 2 public: 3...
分类:
其他好文 时间:
2014-08-24 12:49:02
阅读次数:
211
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d =
target? Find all unique quadruplets in the array which gives the sum of target.
Note:
Element...
分类:
其他好文 时间:
2014-08-23 16:49:21
阅读次数:
166
Remove Duplicates from Sorted Array
Total Accepted: 22879 Total
Submissions: 70824My Submissions
Given a sorted array, remove the duplicates in place such that each element appear only on...
分类:
其他好文 时间:
2014-08-23 15:25:01
阅读次数:
196
Given a m x n matrix,
if an element is 0, set its entire row and column to 0. Do it in place.
原题链接:
题目:给定一个m * n 的矩阵,如果有一个元素是0,将其所在行和列设为0.
思路:先记录下是0 的元素的位置,再去置0.
public void setZeroes(int[][] m...
分类:
其他好文 时间:
2014-08-23 12:43:50
阅读次数:
164
LeetCode: Single NumberGiven an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a...
分类:
其他好文 时间:
2014-08-23 12:38:10
阅读次数:
212
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for...
分类:
其他好文 时间:
2014-08-23 11:14:10
阅读次数:
219
1. float样式获取元素的样式,基本的语法是:element.style.属性,当遇到属性中有“-”连字符时,需要用驼峰命名来代替。由于float是javascript的保留字,我们无法使用object.style.float来获取样式,//IEdocument.getElementById("...
分类:
其他好文 时间:
2014-08-22 23:49:59
阅读次数:
291
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, ...
分类:
其他好文 时间:
2014-08-22 22:18:59
阅读次数:
342