码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
RMQ __ST
迅哥讲解(说实话没有认真听,不过关系不大) RMQ:Range Minimum Maximum Query 给定一个序列A[1…N],问A[i…j]之间的极值 如果只问一次, 显然是O(N) 标准RMQ问题是:不停的查询同一个序列上的不同区间内的极值 序列A的长度N,一共Q次查询 纯暴力法:O(NQ ...
分类:其他好文   时间:2020-03-12 23:16:13    阅读次数:57
递归(Python3)
# 递归:在函数中自己调用自己 # 递归超过最大深度报错:RecursionError: maximum recursion depth exceeded while calling a Python object # sys.setrecursionlimit(100000) 可修改递归深度,默认 ...
分类:编程语言   时间:2020-03-12 20:27:59    阅读次数:63
C++.模块3
``` #include typedef LONG NTSTATUS; typedef LONG KPRIORITY; #define STATUS_SUCCESS ((NTSTATUS) 0x00000000) #define NT_SUCCESS(Status) ((NTSTATUS)(Stat... ...
分类:编程语言   时间:2020-03-11 22:11:27    阅读次数:78
Guava之缓存
一、使用场景 Guava Cache是本地缓存,当数据被重复查询多次,愿意耗费一些内存空间来减少查询的操作提高查询的速度,就可以使用Guava Cache。 二、使用方式 1.创建 LoadingCache是附带CacheLoader构建而成的缓存实现。创建自己的CacheLoader通常只需要简单 ...
分类:其他好文   时间:2020-03-08 20:22:06    阅读次数:79
css3文字颜色渐变动画
<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1. ...
分类:Web程序   时间:2020-03-07 21:05:13    阅读次数:141
152. Maximum Product Subarray
Input: [2,3,-2,4] Output: 6 Explanation: [2,3] has the largest product 6. Input: [2,-5,-2,-4,3] Output: 24 Explanation: [-2,-4,3] has the largest prod ...
分类:其他好文   时间:2020-03-07 13:08:31    阅读次数:54
LeetCode——152. 乘积最大子序列
给定一个整数数组 ,找出一个序列中乘积最大的连续子序列(该序列至少包含一个数)。 示例 1: 示例 2: https://leetcode cn.com/problems/maximum product subarray/ 动态规划 其实这道题最直接的方法就是用 DP 来做,而且要用两个 dp 数组 ...
分类:其他好文   时间:2020-03-06 13:34:45    阅读次数:59
[LintCode] 597. Subtree with Maximum Average
Given a binary tree, find the subtree with maximum average. Return the root of the subtree. Example 1 Input: {1,-5,11,1,2,4,-2} Output:11 Explanation: ...
分类:其他好文   时间:2020-03-05 13:42:34    阅读次数:56
5. 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. Example 1: Input: "babad" Output: ...
分类:其他好文   时间:2020-03-05 11:52:43    阅读次数:60
Maximum Flow
本文参考以下文章 "Maximum flow" Flow Networks基本性质 在图论中,网络流被定义为一个有向图,其中包含一个起点 S ource和一个终点 T arget,以及几条连接各顶点的边。每条边都有各自的容量 C apacity,这是边所能允许的最大流量 网络流中的流量$f$应满足如 ...
分类:其他好文   时间:2020-03-04 23:05:40    阅读次数:69
4142条   上一页 1 ... 20 21 22 23 24 ... 415 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!