C++/Programming
sumhhhh1234
这个作者很懒,什么都没留下…
展开
-
stack-structured algorithm and queue-structured algorithm
https://www.ics.uci.edu/~eppstein/161/960215.html http://www.egr.unlv.edu/~larmore/Courses/CSC477/bfsDfs.pdf原创 2017-10-02 11:35:56 · 211 阅读 · 0 评论 -
Range based for loop
Range-based for loop is better for container . Strings, arrays, and all STL containers can be iterated over with the new range-based for loop already https://www.cprogramming.com/c++11/c++11-ran原创 2017-10-03 11:07:47 · 318 阅读 · 0 评论 -
Hash Map / Hash Set
Two sum Majority number原创 2017-10-11 12:33:02 · 218 阅读 · 0 评论 -
Aggregate POD and initialize struct to 0
Aggregate class and POD http://stackoverflow.com/questions/4178175/what-are-aggregates-and-pods-and-how-why-are-they-special/4178176#4178176 An aggregate is an array or a class (clause 9) with no转载 2016-03-02 12:01:00 · 404 阅读 · 0 评论 -
RAII 的妙用
RAII 就是为了防止 e.g 1) malloc 忘了 delete 2) open 忘了 close 3) acquire lock忘了 release good link https://www.tomdalling.com/blog/software-design/resource-acquisition-is-initialisation-raii-explained/ http转载 2017-10-23 10:22:10 · 272 阅读 · 0 评论