码迷,mamicode.com
首页 >  
搜索关键字:merge two sorted lis    ( 37279个结果
Merge Two Sorted Lists
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./***Defin...
分类:其他好文   时间:2014-06-04 19:23:45    阅读次数:243
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".classSolution{public:stringaddBinary(stringa,st...
分类:其他好文   时间:2014-06-04 19:23:09    阅读次数:235
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:其他好文   时间:2014-06-04 19:19:16    阅读次数:205
Remove Duplicates from Sorted Array II
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...
分类:其他好文   时间:2014-06-04 19:12:47    阅读次数:273
Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2014-06-04 18:58:39    阅读次数:277
[leetcode]Median of Two Sorted Arrays @ Python
原题地址:https://oj.leetcode.com/problems/median-of-two-sorted-arrays/题意:There are two sorted arrays A and B of size m and n respectively. Find the median...
分类:编程语言   时间:2014-06-04 18:52:31    阅读次数:356
Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:其他好文   时间:2014-06-04 18:37:18    阅读次数:277
Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:其他好文   时间:2014-06-04 18:18:08    阅读次数:259
Settings app简单学习记录
Settings是android系统设置的入口。主界面由Settings.java以及settings_headers.xml构成。Settings类继承自PreferenceActivity,而PreferenceActivity又继承自ListActivity,ListActivity拥有Lis...
分类:移动开发   时间:2014-06-03 13:59:05    阅读次数:340
LeetCode Merge K Sorted Lists
class Solution {public: ListNode *mergeKLists(vector &lists) { ListNode* merged = NULL; for (int i=0; ival val) { n...
分类:其他好文   时间:2014-06-03 13:26:43    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!