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++代码如下:#...
分类:
其他好文 时间:
2014-11-14 17:13:09
阅读次数:
193
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2014-11-14 14:22:50
阅读次数:
164
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...
分类:
其他好文 时间:
2014-11-14 08:08:24
阅读次数:
197
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 ru...
分类:
其他好文 时间:
2014-11-13 22:11:38
阅读次数:
141
Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime complex...
分类:
其他好文 时间:
2014-11-13 16:03:20
阅读次数:
139
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-11-13 14:45:51
阅读次数:
172
原文:2000条你应知的WPF小姿势 基础篇 在正文开始之前需要介绍一个人:Sean Sexton.来自明尼苏达双城的软件工程师。最为出色的是他维护了两个博客:2,000ThingsYou Should Know About C#和2,000 Things You Should Know About...
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-11-12 16:15:21
阅读次数:
118
问题描述:
Given an integer n, generate a square matrix filled with elements from 1 to
n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9,...
分类:
其他好文 时间:
2014-11-12 15:06:18
阅读次数:
183
问题描述:
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 numbers such that they add up to the targ...
分类:
其他好文 时间:
2014-11-11 21:10:38
阅读次数:
111