Python 自定义 JSON Encoder 发表于 2021-06-15 分类于 misc , daily , 2021 本文字数: 60 阅读时长 ≈ 1 分钟继承 json.JSONEncoder 类, 重载 default 方法
Numpy, SciPy, Matplotlib 和 Pandas 学习 发表于 2021-03-14 分类于 misc , daily , 2021 本文字数: 107 阅读时长 ≈ 1 分钟时间过的真快啊,转眼间已经是 3 4 月了!
5. 最长回文子串 发表于 2021-03-01 分类于 programming , algorithm-practice , leetcode 本文字数: 121 阅读时长 ≈ 1 分钟动态规划 < 中心扩展算法 < manacher
25. K 个一组翻转链表 发表于 2021-03-01 分类于 programming , algorithm-practice , leetcode 本文字数: 83 阅读时长 ≈ 1 分钟12345678910111213141516171819202122232425262728293031323334353637class Solution{ public: ListNode *reverseKGroup(ListNode *head, int k) { ListNode _header(0, head); ListNode *last = &_header; head = last; int count = 0; while (head) { head = head->next; count++; if (head && count == k) { count -= k; ListNode *tmp_last_next = last->next; reverseK(last, k); head = last = tmp_last_next; } } return _header.next; } void reverseK(ListNode *start, int k) { ListNode *cur = start, *next = start->next; int count = 0; while (count < k) { ListNode *tmp = next->next; next->next = cur; cur = next; next = tmp; count++; } start->next->next = next; start->next = cur; }};
3. 无重复字符的最长子串 发表于 2021-03-01 分类于 programming , algorithm-practice , leetcode 本文字数: 61 阅读时长 ≈ 1 分钟滑动窗口
日本语 0x01 发表于 2021-02-15 分类于 misc , japanese 本文字数: 190 阅读时长 ≈ 1 分钟23 consonant sounds + 5 vowel sounds, with pitch accent
Bash 基本使用总结 发表于 2021-02-11 分类于 programming , linux 本文字数: 461 阅读时长 ≈ 2 分钟123456789^c 终止当前进程^z 将当前进程挂起到后台^d 退出, 等价于exit^l 清屏^r 搜索历史命令^a 光标移到开头^e 光标移到结尾^u 删除光标前所有内容^k 删除光标后所有内容