HystrixInvocationHandler.invoke() >HystrixCommand.execute() >queue() >toObservable().toBlocking.toFuture() >toFuture方法中that.single().subscribe()订阅subs ...
分类:
其他好文 时间:
2019-10-19 21:06:46
阅读次数:
91
题目如下: Given an array nums of positive integers, return the longest possible length of an array prefix of nums, such that it is possible to remove exac ...
分类:
其他好文 时间:
2019-10-16 11:43:10
阅读次数:
119
最近要同事debug性能,不经意间发现现在Golang性能开始吊打Java了!!!感觉Go发展神速!! 之前Go和Java基本是平手,甚至还有较大差距,请见https://www.cnblogs.com/sunsky303/p/6506663.html。借此机会对比了下,Java/Go http s ...
分类:
编程语言 时间:
2019-10-15 20:44:30
阅读次数:
126
Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Example 2: ...
分类:
其他好文 时间:
2019-10-15 10:15:53
阅读次数:
83
题目: Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Example 2: Note: Length o ...
分类:
编程语言 时间:
2019-10-15 00:03:19
阅读次数:
112
题意: 求两个串的最大$LCS$。 思路: 把第一个串建后缀自动机,第二个串跑后缀自动机,如果一个节点失配了,那么往父节点跑,期间更新答案即可。 代码: cpp include include include include include include include include inclu ...
分类:
其他好文 时间:
2019-10-13 19:14:46
阅读次数:
119
题意: 求$n$个串的最大$LCS$。 思路: 把第一个串建后缀自动机,然后枚举所有串。对于每个串,求出这个串在$i$节点的最大匹配为$temp[i]$(当前串在这个节点最多取多少),然后我们求出最终所有串在$i$节点的匹配最小值$mn[i]$(即为所有串在$i$节点都能取到多少),答案即为$max ...
分类:
其他好文 时间:
2019-10-13 18:31:33
阅读次数:
109
1218 Longest Arithmetic Subsequence of Given Difference 最长定差子序列 问题描述 给你一个整数数组 和一个整数 ,请你找出 中所有相邻元素之间的差等于给定 的等差子序列,并返回其中最长的等差子序列的长度。 示例 1: 输入 :arr = [1, ...
分类:
其他好文 时间:
2019-10-12 11:27:48
阅读次数:
112
5. Longest Palindromic Substring Medium 4506406FavoriteShare 5. Longest Palindromic Substring Medium 4506406FavoriteShare Medium Given a string s, fin ...
分类:
其他好文 时间:
2019-10-11 23:49:20
阅读次数:
164
题目链接: https://vjudge.net/problem/SPOJ-LCS 题意: 最多10行字符串 求最大公共子序列 数据范围: $1\leq |S| \leq100000$ 分析: 让他们都和第一个字符串匹配,算出每个字符串与第一个字符串的,以$i$位置(i指的是在s1中的位置)结尾匹配 ...
分类:
其他好文 时间:
2019-10-07 19:27:35
阅读次数:
77