package LeetCode_31 /** * 31. Next Permutation * https://leetcode.com/problems/next-permutation/description/ * Implement next permutation, which rearr ...
分类:
其他好文 时间:
2020-06-28 18:53:29
阅读次数:
51
1. Your goal in this kata is to implement a difference function, which subtracts one list from another and returns the result. It should remove all va ...
分类:
其他好文 时间:
2020-06-28 09:41:17
阅读次数:
75
栈stack - 是限定在表尾进行插入或删除的线性表 #ifndef __STACK_H__ #define __STACK_H__ #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLF -1 # ...
分类:
编程语言 时间:
2020-06-28 09:31:24
阅读次数:
81
Flatten Nested List Iterator (M) 题目 Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list ...
分类:
其他好文 时间:
2020-06-28 09:23:02
阅读次数:
45
https://stackoverflow.com/questions/39626194/should-i-avoid-using-dependency-injection-and-ioc 使用 ioc 时貌似需要写不少的 boilerplate 代码,有时候会困惑是否值得。这篇帖子探讨了其优缺点。 ...
分类:
其他好文 时间:
2020-06-28 09:22:00
阅读次数:
66
https://math.stackexchange.com/questions/326197/the-equivalence-between-cauchy-integral-and-riemann-integral-for-bounded-functio https://zhuanlan.zhih ...
分类:
其他好文 时间:
2020-06-28 00:22:26
阅读次数:
63
[TOC] # 有效的括号```给定一个只包括 '(',')','{','}','[',']'的字符串,判断字符串是否有效。有效字符串需满足:左括号必须用相同类型的右括号闭合。左括号必须以正确的顺序闭合。注意空字符串可被认为是有效字符串。示例 1:输入: "()"输出: true示例2:输入: "(... ...
分类:
其他好文 时间:
2020-06-27 20:22:26
阅读次数:
67
题目传送门 #Code #include<iostream> #include<cstdio> #include<string> #include<vector> #include<algorithm> #include<cstdlib> #include<cmath> #include<stack ...
分类:
其他好文 时间:
2020-06-27 20:05:01
阅读次数:
54
Pop Sequence:: Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to te ...
分类:
其他好文 时间:
2020-06-27 13:25:15
阅读次数:
53
给定一棵大小为 \(n\) 的树,每个结点都有颜色。 定义 \(s(i, j)\) 为从 \(i\) 到 \(j\) 的不同颜色数量以及 \(sum_i = \sum\limits_{j= 1}^ns(i,j)\)。 求出所有的 \(sum_i\)。 较为复杂的点分治题。 也可以用差分 \(O(n) ...
分类:
其他好文 时间:
2020-06-27 13:15:18
阅读次数:
52