1 . 所在模块,一般在openstack/common/log.py,其实最主要的还是调用了python中的logging模块; 入口函数在def setup(product_name, version='unknown'): """Setup logging.""" if CONF.log_co...
分类:
其他好文 时间:
2014-10-26 21:04:15
阅读次数:
696
DP、KMP什么的都太高大上了,自己想了个朴素的遍历方法。
【题目】
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palin...
分类:
其他好文 时间:
2014-10-26 15:37:32
阅读次数:
249
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Your goal i...
分类:
其他好文 时间:
2014-10-26 14:25:29
阅读次数:
172
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-10-26 14:18:14
阅读次数:
251
Multithreaded Libraries PerformanceThe single-threaded CRT is no longer ( in vs2005 ) available. This topic discusses how to get the maximum performan...
分类:
其他好文 时间:
2014-10-26 10:21:23
阅读次数:
288
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-10-26 07:58:51
阅读次数:
161
1. 概述
RMQ(Range Minimum/Maximum Query),即区间最值查询,是指这样一个问题:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j当然,该问题也可以用线段树(也叫区间树)解决,算法复杂度为:O(N)~O(logN),这里我们暂不介绍。
2.RMQ算法
对于该问题,最容易想到的解决方案是遍历,复杂度是O(n)。但当数据量非常大...
分类:
其他好文 时间:
2014-10-25 21:36:10
阅读次数:
218
1. Any 返回没有Product的Categoryvar expr = from c in context.Categories where !c.Products.Any() select c;SELECT [Extent1].[Categ...
分类:
数据库 时间:
2014-10-25 20:00:31
阅读次数:
284
题目
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node....
分类:
其他好文 时间:
2014-10-25 18:50:01
阅读次数:
137