作者:X
Wang出处:http://www.programcreek.com/2013/09/top-10-methods-for-java-arrays/转载文章,转载请注明作者和出处The
following are top 10 methods for Java Array. They ar...
分类:
编程语言 时间:
2014-05-12 22:07:28
阅读次数:
530
原题地址:http://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/题意:将一个排序好的数组转换为一颗二叉查找树,这颗二叉查找树要求是平衡的。解题思路:由于要求二叉查找树是平衡的。所以我们可以选在数组的中间那...
分类:
编程语言 时间:
2014-05-12 21:44:57
阅读次数:
379
Best Time to Buy and Sell StockSay you have an
array for which theithelement is the price of a given stock on dayi.If you were
only permitted to compl...
分类:
其他好文 时间:
2014-05-12 05:56:14
阅读次数:
315
public class ThreadTest implements Callable {
public String call() throws Exception {
// TODO Auto-generated method stub
wait(10000);
return "hello";
}
}调用代码:
public static void main(Stri...
分类:
编程语言 时间:
2014-05-11 21:27:24
阅读次数:
533
Given a linked list, reverse the nodes of a
linked listkat a time and return its modified list.If the number of nodes is not
a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-05-11 18:15:52
阅读次数:
300
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-11 16:03:43
阅读次数:
327
java对字符串的各种方法封装的很好,总结一下项目中用到的字符串操作:1、将获取到的字符串,使用某种字符(例如空格“
”,逗号“,”),将字符串分隔,获取到一个字符串数组,使用split方法String strSplit[] = w.split("
");//w是待分割的字符串,使用空格分割Stri...
分类:
其他好文 时间:
2014-05-11 15:47:27
阅读次数:
232
Given an array of words and a length L, format
the text such that each line has exactly L characters and is fully (left and
right) justified.You shoul...
分类:
其他好文 时间:
2014-05-11 15:15:29
阅读次数:
287
Search Insert Position
Total Accepted: 14091 Total
Submissions: 41005My Submissions
Given a sorted array and a target value, return the index if the target is found. If not, return the in...
分类:
其他好文 时间:
2014-05-11 05:53:03
阅读次数:
241
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Single Number II
Total Accepted: 14224 Total
Submissions: 43648
Given an array of integers, every element appears three ti...
分类:
其他好文 时间:
2014-05-11 03:54:46
阅读次数:
317