码迷,mamicode.com
首页 >  
搜索关键字:heap space    ( 20988个结果
Leetcode Set Matrix Zeroes
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s...
分类:其他好文   时间:2014-06-28 09:55:50    阅读次数:205
LeetCode-Sort List(Python)
【问题】 Sort a linked list in O(n log n) time using constant space complexity. 【代码】 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # ...
分类:编程语言   时间:2014-06-28 08:29:23    阅读次数:222
leetcode - Linked List Cycle
题目:Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?个人思路:1、判断一个链表是否有环,标准做法...
分类:其他好文   时间:2014-06-27 19:41:40    阅读次数:165
#Quiz(ra992_110510)
实变函数论(Pei-Yuan Wu)期中考试题目。影音文件序号为ra992_110510。第一题关于Metric space;二三题关于算子是否有界(微分算子是无界的,积分算子是有界的,因此我们常用积分算子而不用微分算子);第四题关于Stone-Weierstrass定理以及连续函数在L2里面是de...
分类:其他好文   时间:2014-06-27 16:32:07    阅读次数:172
[leetcode] Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.
分类:其他好文   时间:2014-06-27 12:28:06    阅读次数:228
[再寄小读者之数学篇](2014-06-26 Logarithmical Sobolev inequality using BMO space)
$$\bex q>3\ra \sen{\n f}_{L^\infty} \leq C(q)\sez{ 1+\sen{\n f}_{BMO} \ln^\frac{1}{2}\sex{e+\sen{\n f}_{W^{1,q}}+\sen{f}_{L^\infty}} }. \eex$$ $$\bex ...
分类:其他好文   时间:2014-06-27 11:12:18    阅读次数:132
[再寄小读者之数学篇](2014-06-26 Besov space estimates)
(1) $$\bex \sen{D^k f}_{\dot B^s_{p,q}}\sim \sen{f}_{\dot B^{s+k}_{p,q}}. \eex$$ (2) $$\beex \bea &\quad s>0,\ q\in [1,\infty],\quad p_1,r_1\in [1,\in...
分类:其他好文   时间:2014-06-27 11:03:38    阅读次数:229
LeetCode Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is d...
分类:其他好文   时间:2014-06-27 10:18:32    阅读次数:151
STL之heap相关操作算法
堆(heap)是一种非常重要的数据结构(这里我们讨论的是二叉堆),它是一棵满足特定条件的完全二叉树,堆的定义如下: 堆是一棵树完全二叉树,对于该完全二叉树中的每一个结点x,其关键字大于等于(或小于等于)其左右孩子结点,而其左右子树均为一个二叉堆。...
分类:其他好文   时间:2014-06-27 08:41:58    阅读次数:225
STL之容器适配器priority_queue的实现框架
在前面的文章STL之heap相关操作算法中介绍了堆的相关操作算法,由于堆的注意主要作用是用于排序,我们也知道堆排序的时间复杂度为o(nlogn),是一种不稳定的排序算法,利用堆这一数据结构,我们可以很快第获取一个大数据中最大(或最小)的k个数。同时,上篇文章中,也提出了相关heap算法的一些问题...
分类:其他好文   时间:2014-06-27 08:16:59    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!