码迷,mamicode.com
首页 >  
搜索关键字:maximum number of th    ( 33896个结果
Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-07-09 23:32:44    阅读次数:276
Flex 数组问题!
设计一个图形类,来对应一个图形!这个类大概的代码是:public class ShapeModel extends ... { [bindable] private var _x:Number = 0; [bindable] private var _y:Number = 0...
分类:其他好文   时间:2014-07-09 22:40:29    阅读次数:207
Javascript对象拷贝(clone)
1. [代码]方法代码 function cp(source, target) { function isBaseType(v) { var type = typeof v; var basetype = { "string": true, "number": t...
分类:编程语言   时间:2014-07-06 13:29:36    阅读次数:270
查找一个数组中最小的前n项
/****************************************************************** find the biggest x number in a sequence* the basic method is the same as the Quic....
分类:其他好文   时间:2014-07-06 13:12:01    阅读次数:176
POJ 2309 BST 树状数组基本操作
Description Consider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this ...
分类:其他好文   时间:2014-07-06 11:36:14    阅读次数:284
素数判定 费马测试
;; Fermat's Little Theorem: ;; If N is a prime number and A is any positive integer less ;; than N, then A raised to the N-th power is congruent to A modulo N ;; Two numbers are said to be congruent...
分类:其他好文   时间:2014-07-06 09:05:22    阅读次数:158
简单记录一次ORA-00600: internal error code, arguments: [4194]
接上一篇,在搞定SCN问题后,又遇到ORA-600[4194]/[4193]报错。 故障现象: OPEN数据库时报错:ORA-00600: internal error code, arguments: [4194], [], [], [], [], [], [], [] 4193:表示undo和redo不一致(Arg [a] Undo record seq number,Arg...
分类:其他好文   时间:2014-07-06 00:38:31    阅读次数:297
LeetCode——Longest Palindromic Substring
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 palindromic substring. 给定一个字符串S,找出其中的最长回文...
分类:其他好文   时间:2014-07-06 00:15:15    阅读次数:240
POJ 3693 Maximum repetition substring (后缀数组)
题目大意: 求出字典序最小,重复次数最多,的子串。 思路分析: RMQ + height 数组可以求出任意两个后缀的lcp 我们枚举答案字符串的重复的长度。 如果这个字符串的长度为 l ,而且这个字符串出现过两次或两次以上 那么你会发现在原串中  str[0] str[l] str[2*l] ....肯定有相邻的两个被包含在重复的串中。 我们求出这两个相邻的后缀的lcp 我...
分类:其他好文   时间:2014-07-05 23:47:48    阅读次数:178
解析java树形结构
思路一:1、准备表结构及对应的表数据a、表结构:create table TB_TREE(CID NUMBER not null,CNAME VARCHAR2(50),PID NUMBER //父节点)b、表数据:insert into tb_tree (CID, CNAME, PID) value...
分类:编程语言   时间:2014-07-05 20:54:07    阅读次数:396
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!