现在想补补推荐这本书的理由. Most books on systems-computer architecture, compilers, operating systems, and networking-are written as if the reader were going to design and implement such a system. We call this the "builder's persepective." We believe that st…
<Computer Systems a Programmer's Perspective>,机械工业出版社.中文译名<深入理解计算机系统>.作者:(美)Randal E.Bryant / David O'Hallaron 想写点推荐理由,作罢,原因是自己学识尚浅(留坑以后写?).这里附上几个链接,也许你看过之后,也会产生和我一样的想法,阅读这本计算机界的经典著作. 豆瓣--深入理解计算机系统(原书第2版) 老赵书托(3):深入理解计算机系统 CMU CSAPP网站:何为Progra…
普通的 int 整型能表示的范围很有限,所以刷题时很多时候不得不用 long long 来存更大的数据.或者找出数列中某个只出现一次(或奇数次)的数(其余的数均出现两次 / 偶数次),用异或运算的经典题目,然而,如果数据范围不大的话,O(n) 的复杂度下,把第一次出现的所有数全加 / 乘起来,然后再减 / 除去第二次出现的 n - 1 个数(缺少的那个就是要求的数),原理是可以的,只是一般 OJ 出这样的题目必然不会让你用这种小学生的思维去做,所以会把数据设置得奇大,让你一累加必然溢出,更不用说…
一.定义 integral promotion: "A character, a short integer, or an integer bit-field, all either signed or not, or an object of enumeration type, may be used in an expression wherever an integer may be used. If an int can represent all the values of the o…