码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:其他好文   时间:2014-07-12 00:15:07    阅读次数:268
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100"class Solution {public: string addBinary(stri...
分类:其他好文   时间:2014-07-11 20:05:47    阅读次数:224
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 eq...
分类:其他好文   时间:2014-07-10 14:41:23    阅读次数:177
CTCI 2.4
Write code to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x.Use two addit...
分类:其他好文   时间:2014-07-09 17:44:36    阅读次数:159
CTCI 2.5
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the Ts d...
分类:其他好文   时间:2014-07-09 15:35:19    阅读次数:176
整形提升(c语言基础)
When you use an arithmetic operator, the operands go through two conversions.Integer promotions: If int can represent all values of the type, then the...
分类:编程语言   时间:2014-07-09 13:46:00    阅读次数:278
POJ2406-Power Strings(kmp循环节)
Power Strings Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 31111   Accepted: 12982 Description Given two strings a and b we define a*b to be their concate...
分类:其他好文   时间:2014-07-09 11:11:53    阅读次数:155
Cracking the Coding Interview Q1.8
Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a ...
分类:其他好文   时间:2014-07-08 21:44:23    阅读次数:177
Cracking the Coding Interview Q2.5
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s ...
分类:其他好文   时间:2014-07-08 13:34:40    阅读次数:195
HDU 4587 TWO NODES (双连通割点应用)
题意:N个点(0~n-1),M条无向边,问去掉2个点后最多的连通分块有多少。 先去掉一个点求出各个割点,并在dfs过程中求出去掉这个割点有多少个连通分块(将iscut[u]=true改为iscut[u]++), 这样子第二次就可以直接找出最多的连通分块了。 #include #include #include #include #include #include #inclu...
分类:其他好文   时间:2014-07-08 13:06:23    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!