Posts
一个好消息一个坏消息
这段时间发生了两件大事。如上文所说,其一是我去了湾区面了两家公司,一个给了offer;其二是我爱了五年的人对我说,她不想再等我了。 最可怕的事情是我的价值观塌陷了,起码在两周之前我还在想着怎么变强,怎么让自己能在这个陌生的地方有个立足之地,怎么让我心爱的人因为我过上更好的生活。但是她说,“这些都不是我想要的”。我说,“ …
心态要炸
我发现给自己打气这种事情是非常傻逼的,你本来就是弱,还要麻醉自己说没事,一切都会好的。还有那些说你肯定没问题的人,在我看来也是傻逼,你怎么知道我肯定没问题。过的很惨的人,要么想听的是你狠狠批我,要么就是想知道你比我过得还惨。优越感对于人来说就是癌变组织,越崇尚他死的就越快,趁早打消这种无趣的想法。还是那句老话,“菜是原 …
Search Problems in Interview
暂时不想写
K-th Problems in Interview
K-th问题是说在给定数据集中,找到排名第k个的数据。通常这个数据集极大是没办法存在内存中,或者遍历一遍数据集的时间代价很高。通常解决这种方法是维护一个k大小的最大堆,这样我们可以一直维护top k个数据。这种方法比较常见且简单,这里我想说得是一般这种K-th类问题是可以通过Binary Search解决。 …
Binary Search Tree in Interview
Binary Search Tree (简称BST) 是最简单的搜索树,很多高级树用法都是以它为基础。因为设计它的算法很多都很巧妙,记得在面试的时候突然遇到一道BST的题卡住了。由于BST的结构特殊,所以有关它的题目都很灵活,想借此机会总结一下。 递归与递推 众所周知,BST是天生具有递归特性的,因为的BST的任一子树 …
新年
建好了博客回头发现竟然整整一年没有再用过。一直挂着域名续着钱总不能浪费了。其实是2017过得实在是难以形容,今天想更新一些东西结果发现模板也不能用了,改了之后发现格式排版又乱七八糟,索性改了个默认的算了。去年我做了什么呢,想想也是挺多的。从年中把刷题网站做了快500题,挂了几家公司的面试,开始重新学了下操作系统和数据库 …
Hierarchical Data and the Closure Property
Section 2.2 Hierarchical Data and the Closure Property Exercises in this section of SCIP. Exercise 2.17. Define a procedure last-pair that returns the list that …
Introduction to Data Abstraction
Section 2.1 Introduction to Data Abstraction Exercises in this section of SCIP. Exercise 2.1. Define a better version of make-rat that handles both positive and …
Formulating Abstractions with Higher-Order Procedures
Section 1.3 Formulating Abstractions with Higher-Order Procedures Exercises in this section of SCIP, and Merry Xmas. Exercise 1.29. Simpson’s Rule is a more …
Building Abstractions with Procedures Section 2 - Part 2
Section 1.2 Procedures and the Processes They Generate Exercises in this section of SCIP. Exercise 1.20. The process that a procedure generates is of course …