码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
poj1753,Flip Game
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 30449   Accepted: 13232 Description Flip game is played on a rectangular 4x4 field with two-sided p...
分类:其他好文   时间:2014-07-29 14:33:28    阅读次数:225
POJ3373:Changing Digits(记忆化)
Description Given two positive integers n and k, you are asked to generate a new integer, say m, by changing some (maybe none) digits of n, such that the following properties holds: m contains n...
分类:其他好文   时间:2014-07-29 14:22:18    阅读次数:225
LeetCode "Divide Two Integers"
A very interesting numeric problem. It involves a lot tricks.Linear search (by +\-) is not feasible - too slow. So binary search is a good idea. Also ...
分类:其他好文   时间:2014-07-29 14:02:08    阅读次数:187
[LeetCode 题解]:Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题意:给定一个有序的链表,将其转换成平衡二叉搜索树思路: 二分法要构建一个平衡二叉...
分类:其他好文   时间:2014-07-29 13:40:48    阅读次数:601
HDU - 1757 A Simple Math Problem (构造矩阵)
Description Lele now is thinking about a simple function f(x). If x If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10); And ai(0 Now, I will give a0 ~ a9 and two...
分类:其他好文   时间:2014-07-29 13:13:36    阅读次数:205
Laravel 4 Development on PHPStorm
Laravel & PHPStorm – the best of the two worlds. Laravel is the most popular PHP web framework today. PHPStorm is the best PHP IDE that money can buy....
分类:Web程序   时间:2014-07-29 12:42:06    阅读次数:309
如何在JS数组特定索引处指定位置插入元素?
如何在JS数组特定索引处指定位置插入元素?需求: 将一个元素插入到现有数组的特定索引处。听起来很容易和常见,但需要一点时间来研究它。// 原来的数组var array = ["one", "two", "four"];// splice(position, numberOfItemsToRemove...
分类:Web程序   时间:2014-07-29 12:09:06    阅读次数:429
[LeetCode 题解]: 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-07-29 11:29:56    阅读次数:256
[LeetCode 题解]: Merge k Sorted Lists
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.题意:对k个有序的链表进行归并排序。并分析其复杂度。/** * Definition for singly-...
分类:其他好文   时间:2014-07-29 11:02:16    阅读次数:205
LeetCode : add two numbers
解法:比较简单,用plus表示进位 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(in...
分类:其他好文   时间:2014-07-29 10:53:06    阅读次数:273
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!