摘要:
无记忆:输出只和当前时刻的输入有关。 可逆invertability:对应一个输入只有一种可能的输入。级联系统A和A的逆系统(如果A可逆)组成一个恒等系统。 积分integrator电路和微分differentiator电路是一对逆。 线性:线性叠加的输入,对应相同线性操作的输出。 时不变:输入的时 阅读全文
posted @ 2020-03-29 20:59
比特的脉搏
阅读(589)
评论(0)
推荐(0)
摘要:
涉及unordered_set类型的使用,包括find()、insert()、erase()函数使用。 滑动窗口:当前字符串不存在字串中,直接插入;若存在,将最左边的元素一直移除直到不存在。这样相当于遍历了所有无重复连续字串。 class Solution { public: int lengthO 阅读全文
posted @ 2020-03-29 14:45
比特的脉搏
阅读(164)
评论(0)
推荐(0)
摘要:
将数组的 下标、值 作为 值-键 对放入map ,用find函数查找,时间复杂度为o(n)降为o(1)。 拿空间换时间,能达到去重的目的。 当然存放还是需要o(n)的时间复杂度,可用于o(n^2)降为o(n)。 map<int,int> m; m[arr[index]] = index; if(m. 阅读全文
posted @ 2020-03-29 14:37
比特的脉搏
阅读(1132)
评论(1)
推荐(0)
摘要:
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ ListNode * 阅读全文
posted @ 2020-03-29 14:35
比特的脉搏
阅读(99)
评论(0)
推荐(0)

浙公网安备 33010602011771号