Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p...
分类:
其他好文 时间:
2015-02-09 15:28:49
阅读次数:
124
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2015-02-09 15:24:59
阅读次数:
125
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:
其他好文 时间:
2015-02-09 14:03:20
阅读次数:
85
JAVA JVM Architecture Improving Lock Performance in Java 10 Best Java Tools That Every Java Programmers Should Know Web Performance Optimization in AS...
分类:
其他好文 时间:
2015-02-09 10:43:15
阅读次数:
146
题目链接:First Missing Positive
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run...
分类:
其他好文 时间:
2015-02-09 00:48:51
阅读次数:
143
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.给定一个整数n,返回n!(n的阶乘)数字中的后缀0的个数。...
分类:
其他好文 时间:
2015-02-09 00:37:06
阅读次数:
256
You are given n integers. Your task is very easy. You should find the maximum integer a and the minimum integer b among these n integers.
And then you should replace both a and bwith a-b. Your task ...
分类:
其他好文 时间:
2015-02-08 15:34:12
阅读次数:
165
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2015-02-08 11:33:15
阅读次数:
152
Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity....
分类:
其他好文 时间:
2015-02-07 21:45:08
阅读次数:
273
Spiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3,You should ret...
分类:
其他好文 时间:
2015-02-07 17:14:43
阅读次数:
82