以下是本周arts:
1.algorithm:
本周足了下面这道题,使用栈来解码一个字符串。我提交了C++和python两个版本的代码,python的代码非常简洁,又一次感叹python处理字符串的强大。下面给出讨论区里面的c++和python版本对比。
https://leetcode.com/problems/decode-string/submissions/
https://leetcode.com/problems/decode-string/discuss/87543/0ms-simple-C%2B%2B-solution
https://leetcode.com/problems/decode-string/discuss/87563/Share-my-Python-Stack-Simple-Solution-(Easy-to-understand)
2.review:
读了关于intel架构cpu缓存的一篇文章:
https://software.intel.com/en-us/articles/optimizing-application-performance-on-intel-coret-microarchitecture-using-hardware-implemented-prefetchers
3.techinique:
如何用c++计算cache的容量
别小看这个问题,C++的一个重要特点就是能够发挥硬件的极致性能,而发挥硬件的极致性能就要充分利用缓存。可以参考下面这篇文章计算缓存容量。
https://stackoverflow.com/questions/19136846/write-a-program-to-get-cpu-cache-sizes-and-levels
4.sharing:
本周总结整理了一些C++知识点,面试必问
https://blog.csdn.net/tassardge/article/details/101724789