码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
Leetcode:merge_two_sorted_lists
合并两个排好序的链表,按照节点的大小排列。...
分类:其他好文   时间:2014-10-07 00:46:21    阅读次数:192
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".类似模拟十进制加法 1 class Solution { 2 public: 3 st...
分类:其他好文   时间:2014-10-07 00:00:40    阅读次数:165
LeetCode:Merge Two Sorted Lists
题目:Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:其他好文   时间:2014-10-06 18:31:30    阅读次数:145
N-Queens I&&II
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2014-10-06 16:38:20    阅读次数:249
LeetCode 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-10-06 13:11:00    阅读次数:167
sicily 1024 邻接矩阵与深度优先搜索解题
DescriptionThere are N cities and N-1 roads in Magic-Island. You can go from one city to any other. One road only connects two cities. One day, The ki...
分类:其他好文   时间:2014-10-06 02:45:19    阅读次数:292
[LeetCode] Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-10-05 23:28:39    阅读次数:357
Leetcode Two Sum
struct Node{ int index; int value; }; bool compare(Node a, Node b) { return a.value < b.value; } class Solution { public: vector twoSum(vector &numbers, int target) { ...
分类:其他好文   时间:2014-10-05 22:56:39    阅读次数:252
Remove Duplicates from Sorted Array
class Solution { public: int removeDuplicates(int A[], int n) { int duplicate = 0; int i = 0; for(i = 0; i < n - 1; i++){ if(A[i] == A[i + 1]){ dupli...
分类:其他好文   时间:2014-10-05 22:23:09    阅读次数:183
Leetcode:remove_duplicates_from_sorted_list
给定一个排好序的链表,删除所有重复的节点,使每一个节点都只出现一次...
分类:其他好文   时间:2014-10-05 21:17:09    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!