leetcode打卡 题面 class Solution { public: bool checkPossibility(vector<int> &nums) { int n = nums.size(); for (int i = 0; i < n - 1; ++i) { int x = nums[ ...
分类:
其他好文 时间:
2021-02-08 12:11:43
阅读次数:
0
类似cf582E,先建出表达式树,然后树形dp+离散+min和max卷积的优化,复杂度为$o(nm|E|)$,无法通过 考虑我们仅关心于这$n$个数的大小关系,具体来说,假设给出的数组是$a_{i,j}$(其中$0\le i<m,1\le j\le n$),对于某一个$j$,将$a_{i,j}$从小 ...
分类:
其他好文 时间:
2021-02-08 11:56:15
阅读次数:
0
LinkedHashMap<String,User> result = //方法一 map.entrySet().stream() //根据User中某个字段进行排序 .sorted(Map.Entry.comparingByValue( //若为Map<String,String>,则不需要下面这 ...
分类:
编程语言 时间:
2021-02-06 11:44:18
阅读次数:
0
仅供自己学习 题目: You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the foll ...
分类:
其他好文 时间:
2021-02-04 12:10:58
阅读次数:
0
VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different le ...
分类:
其他好文 时间:
2021-02-03 10:42:18
阅读次数:
0
无序列表 <ul type="none"> <li>第一项</li> <li>第二项</li> <li>第三项</li> <li>第四项</li> </ul> 有序列表 <ol type="1" start="5"> <li>one</li> <li>two</li> <li>three</li> ...
分类:
Web程序 时间:
2021-02-02 11:32:02
阅读次数:
0
两阶段提交 two-phase commit (2PC) 三阶段提交 three-phase commit (3PC) Paxos 算法 ZAB 算法 2PC 两阶段提交,强一致性算法。常用在分布式数据库中,如分布式事务(tcc)。 undo 记录原始数据的样子,事务失败了恢复,成功了记入 redo ...
分类:
其他好文 时间:
2021-02-01 12:36:44
阅读次数:
0
905. 按奇偶排序数组 难度 简单 | 标签 数组 Description 给定一个非负整数数组 A,返回一个数组,在该数组中, A 的所有偶数元素之后跟着所有奇数元素。 你可以返回满足此条件的任何数组作为答案。 示例: 输入:[3,1,2,4] 输出:[2,4,3,1] 输出 [4,2,3,1] ...
分类:
编程语言 时间:
2021-01-29 12:08:34
阅读次数:
0
Power Strings Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcde ...
分类:
其他好文 时间:
2021-01-26 11:47:12
阅读次数:
0
Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into ...
分类:
其他好文 时间:
2021-01-25 11:29:04
阅读次数:
0