问题描述:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
代码:
import java.util.List;
public class Merge...
分类:
其他好文 时间:
2014-10-28 20:03:24
阅读次数:
203
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...
分类:
其他好文 时间:
2014-10-28 10:29:07
阅读次数:
204
gnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then outpu...
分类:
其他好文 时间:
2014-10-27 20:57:39
阅读次数:
218
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
题目描述:
类似以前C语言做的输入两个链表,按照顺序大小将其连接。
不过这次试着用JAVA做,...
分类:
其他好文 时间:
2014-10-27 17:38:37
阅读次数:
147
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-10-27 12:39:09
阅读次数:
192
Given this linked list:1->2->3->4->5Fork= 2, you should return:2->1->4->3->5Fork= 3, you should return:3->2->1->4->5思路:一开始是想要动态规划的方式,即写一个反转函数,每K个字符调用一...
分类:
其他好文 时间:
2014-10-27 10:48:04
阅读次数:
201
ImplementPic. It should return a slice of lengthdy, each element of which is a slice ofdx8-bit unsigned integers. When you run the program, it will di...
分类:
其他好文 时间:
2014-10-27 06:54:12
阅读次数:
281
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-10-27 06:54:01
阅读次数:
203
题目:Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should...
分类:
其他好文 时间:
2014-10-26 22:37:58
阅读次数:
196
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-10-26 21:10:30
阅读次数:
170