码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
CareerCup之1.3字符串去重
【题目】原文:1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two add...
分类:其他好文   时间:2014-06-02 21:32:04    阅读次数:284
每日算法之二十五:Divide Two Integers
Divide two integers without using multiplication, division and mod operator. 不使用乘法、除法和求模运算求两个数相除。...
分类:其他好文   时间:2014-06-01 18:16:23    阅读次数:311
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-06-01 17:05:44    阅读次数:296
POJ 3579- Median
?? Description Given N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤ i < j ≤ N). We can get C(N,2) differences through this work, and no...
分类:其他好文   时间:2014-06-01 14:07:56    阅读次数:347
【LeetCode】Merge Sorted Array
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 (size that ...
分类:其他好文   时间:2014-06-01 12:04:32    阅读次数:175
LeetCode: Scramble String [87]
【题目】 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = "great": great / gr eat / \ / g r e at / ...
分类:其他好文   时间:2014-06-01 09:41:05    阅读次数:196
LeetCode: Merge Sorted Array [088]
【题目】 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 to m + n) to hold additional elements from B. The number of elements initialized in A and B are...
分类:其他好文   时间:2014-06-01 09:21:16    阅读次数:292
LeetCode: Gray Code [089]
【题目】 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0. ...
分类:其他好文   时间:2014-06-01 09:16:29    阅读次数:242
projecteuler---->problem=10----Summation of primes
title: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. 翻译: 10以下的质数的和为2 + 3 + 5 + 7 = 17。 请求出200,0000以下所有质数的和。 import math,time d...
分类:其他好文   时间:2014-06-01 09:12:31    阅读次数:239
redis学习
Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。从2010年3月15日起,Redis的开发工作由VMware主持。 redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sor...
分类:其他好文   时间:2014-06-01 08:49:50    阅读次数:457
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!