码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
为什么有序数组比无序数组快呢?
来自stackoverflow的题目Why is processing a sorted array faster than an unsorted array?...
分类:编程语言   时间:2014-10-12 18:15:58    阅读次数:296
[LeetCode]N-Queens 八皇后问题扩展(经典深搜)
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle...
分类:其他好文   时间:2014-10-12 16:58:58    阅读次数:248
leetcode - Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the...
分类:其他好文   时间:2014-10-12 16:06:48    阅读次数:185
leetcode - Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1-...
分类:其他好文   时间:2014-10-12 15:51:58    阅读次数:190
【LeetCode】N-Queens
N-QueensThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all...
分类:其他好文   时间:2014-10-12 15:11:58    阅读次数:263
leetcode - Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. /** * Definition for s...
分类:其他好文   时间:2014-10-12 13:59:18    阅读次数:182
google在线测试练习题1
Problem You receive a credit C at a local store and would like to buy two items. You first walk through the store and create a list L of all available items. From this list you would like to buy tw...
分类:其他好文   时间:2014-10-12 12:38:28    阅读次数:241
python的排序和查询
#encoding=utf-8__author__ = 'kevinlu1010@qq.com'################# python自带的排序接口 ###################### python内带非常强大的排序函数,sorted,或sort# sorted是内建函数,sor...
分类:编程语言   时间:2014-10-12 11:54:27    阅读次数:242
Leetcode - Insertion Sort List
It is quite a basic problem.  However I spent half an hour solving it and made two mistakes. Guess it's because I haven't written some fundamental data structures like linked list for a while and kind...
分类:其他好文   时间:2014-10-12 09:08:27    阅读次数:176
UVA 12034 Race (递推神马的)
Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way. But everything ...
分类:其他好文   时间:2014-10-12 02:44:17    阅读次数:316
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!