码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
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-28 14:31:12    阅读次数:201
hust 1347 - Reverse Number
题目描述Given a non-negative integer sequence A with length N, you can exchange two adjacent numbers each time. After K exchanging operations, what’s the ...
分类:其他好文   时间:2014-06-22 23:36:42    阅读次数:232
Leetcode:Next Permutation 下一个排列
Next Permutation:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangeme...
分类:其他好文   时间:2014-06-22 23:35:19    阅读次数:262
Leetcode:Minimum Path Sum 矩形网格最小路径和
Minimum Path Sum:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along...
分类:其他好文   时间:2014-06-22 23:06:39    阅读次数:290
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-06-22 22:57:49    阅读次数:347
leetcode——Search for a Range 排序数组中寻找目标下标范围(AC)
Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found ...
分类:其他好文   时间:2014-06-22 21:47:15    阅读次数:269
Geeks - Range Minimum Query RMQ范围最小值查询
使用线段树预处理,可以使得查询RMQ时间效率在O(lgn)。 线段树是记录某范围内的最小值。 标准的线段树应用。 Geeks上只有两道线段树的题目了,而且没有讲到pushUp和pushDown操作,只是线段树的入门了。 参考:http://www.geeksforgeeks.org/segment-tree-set-1-range-minimum-query/ 我修改了一下他的程序,使用...
分类:其他好文   时间:2014-06-22 18:08:05    阅读次数:217
LeetCode:Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2],...
分类:其他好文   时间:2014-06-22 17:07:52    阅读次数:166
POJ 1995 Raising Modulo Numbers (数论-整数快速幂)
题目大意: T组测试数据,求(A1B1+A2B2+ ... +AHBH)mod M. 解题思路: 对于普通暴力算法一定是 A1*A1*A1.....*A1 乘以 B1次, A2*A2...........*A2 乘以 B2次, ...................................... 然后全部相加起来,这样效率很低,肯定是超时了 那么有什么办法解决这一问题,可以用快速幂, 如果 A1^2有了,那么 A1^4就可以得到,A1^8也可以得到,...... ,立刻由n降到了lgn 可以...
分类:其他好文   时间:2014-06-22 16:17:10    阅读次数:178
[转]Configuring Open vSwitch
(image from Anatomy of an open source cloud) A cloud data center consists of large numbers of physical servers, each running a hypervisor with one or ...
分类:其他好文   时间:2014-06-21 14:48:04    阅读次数:225
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!