LeetCode: Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array. Note:You may assume that A has enough space (...
分类:
其他好文 时间:
2014-09-01 22:29:23
阅读次数:
172
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, r...
分类:
其他好文 时间:
2014-09-01 17:42:53
阅读次数:
195
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-09-01 12:15:43
阅读次数:
169
==================================主程序usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceConsoleApplication6
{
classProgram
{
staticvoidMain(string[]args)
{
//有序列表会按照键排序
Sorted..
分类:
其他好文 时间:
2014-09-01 02:55:53
阅读次数:
155
Question:Given an M x N matrix in which each row and each column is sorted in ascending order, write a method to find an element. 1 package POJ; 2 3 ....
分类:
其他好文 时间:
2014-09-01 02:44:02
阅读次数:
209
题目Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the o...
分类:
其他好文 时间:
2014-08-31 22:39:31
阅读次数:
324
---恢复内容开始---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 lis...
分类:
其他好文 时间:
2014-08-31 17:01:51
阅读次数:
270
1 class Solution { 2 public: 3 double findMedianSortedArrays(int A[], int m, int B[], int n) { 4 vector v(m+n); 5 for(int i=0;i<m...
分类:
其他好文 时间:
2014-08-31 10:23:01
阅读次数:
176
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-08-30 02:21:18
阅读次数:
246