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
题目描述:Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list...
分类:
其他好文 时间:
2015-02-07 17:11:34
阅读次数:
105
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the nodes in each of...
分类:
其他好文 时间:
2015-02-07 16:02:00
阅读次数:
141