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
【问题】
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
题目: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
实变函数论(Pei-Yuan Wu)期中考试题目。影音文件序号为ra992_110510。第一题关于Metric space;二三题关于算子是否有界(微分算子是无界的,积分算子是有界的,因此我们常用积分算子而不用微分算子);第四题关于Stone-Weierstrass定理以及连续函数在L2里面是de...
分类:
其他好文 时间:
2014-06-27 16:32:07
阅读次数:
172
Determine whether an integer is a palindrome. Do this without extra space.
分类:
其他好文 时间:
2014-06-27 12:28:06
阅读次数:
228
$$\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
(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
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
堆(heap)是一种非常重要的数据结构(这里我们讨论的是二叉堆),它是一棵满足特定条件的完全二叉树,堆的定义如下:
堆是一棵树完全二叉树,对于该完全二叉树中的每一个结点x,其关键字大于等于(或小于等于)其左右孩子结点,而其左右子树均为一个二叉堆。...
分类:
其他好文 时间:
2014-06-27 08:41:58
阅读次数:
225
在前面的文章STL之heap相关操作算法中介绍了堆的相关操作算法,由于堆的注意主要作用是用于排序,我们也知道堆排序的时间复杂度为o(nlogn),是一种不稳定的排序算法,利用堆这一数据结构,我们可以很快第获取一个大数据中最大(或最小)的k个数。同时,上篇文章中,也提出了相关heap算法的一些问题...
分类:
其他好文 时间:
2014-06-27 08:16:59
阅读次数:
171