摘要: 动态规划(DP)不是某种具体算法,而是一种思想。把大问题转化为小问题,利用小问题的解推断出大问题就是DP的核心思想。 step 1: 设计状态。把面临的每一个问题,用状态表达出来。 step 2: 设计转移。写出状态转移方程,从而利用小问题的解推出大问题的解。 两种状态转移的方法 1.pull型:从 阅读全文
posted @ 2020-08-22 04:39 linsinan1995 阅读(329) 评论(0) 推荐(0)
摘要: Day1 359.Logger Rate Limiter Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and o 阅读全文
posted @ 2020-08-21 20:05 linsinan1995 阅读(123) 评论(0) 推荐(0)
摘要: 主要涉及lecture4~lecture6, 系统调用的部分和多线程。 系统调用 多进程 shell实现 - execvp - pipe signal 1.系统调用 每个进程都有自己的内存空间。each process operates as if it owns all of main memor 阅读全文
posted @ 2020-08-02 04:53 linsinan1995 阅读(314) 评论(0) 推荐(0)
摘要: Item 18: Use std::unique_ptr for exclusive-ownership resource management. Item 19: Use std::shared_ptr for shared-ownership resource management. Item 阅读全文
posted @ 2020-08-01 04:58 linsinan1995 阅读(142) 评论(0) 推荐(0)
摘要: Item 13: 优先使用const_iterators而不是iterators 使用cbegin和cend(c++11)。 // in container, find first occurrence of targetVal, then insert insertVal there templa 阅读全文
posted @ 2020-07-31 15:27 linsinan1995 阅读(147) 评论(0) 推荐(0)
摘要: 本篇笔记主要涵盖CS110第1到第4节课关于文件系统的部分。 https://www.youtube.com/watch?v=_LFGjZ0Sc6I&list=PLai-xIlqf4JmTNR9aPCwIAOySs1GOm8sQ Lecture 1 umask, open, read和write系统 阅读全文
posted @ 2020-07-29 02:39 linsinan1995 阅读(728) 评论(0) 推荐(0)
摘要: Item 7: 区分使用()和 三种常见的创建方式 int x(0); // initializer is in parentheses int y = 0; // initializer follows "=" int z{ 0 }; // initializer is in braces 但是初 阅读全文
posted @ 2020-07-28 22:07 linsinan1995 阅读(171) 评论(0) 推荐(0)
摘要: Klaus Iglberger, The SOLID Principles at Core C++ meetup 观后感。Klaus Iglberger每次的分享都能收获不少,所以这次拿好纸笔好好学习。 What SOLID stands for? Single-responsibility pri 阅读全文
posted @ 2020-07-28 07:06 linsinan1995 阅读(308) 评论(0) 推荐(0)
摘要: 好多要学的,再偷懒就要失业了。2020加油吧。 计算机类 操作系统 CS110 编译原理 CS143 数据库原理 CS145 C++类 刷完CppCon back to basics modern effective c++ effective stl concurrency in action 对 阅读全文
posted @ 2020-07-28 04:39 linsinan1995 阅读(131) 评论(0) 推荐(0)
摘要: 1.Deducing Types Item 1: 理解模板的类别推导 template<typename T> void f(ParamType param); f(expr); // deduce T and ParamType from expr Case 1: ParamType是引用或者指针 阅读全文
posted @ 2020-07-28 02:09 linsinan1995 阅读(310) 评论(0) 推荐(0)