随笔分类 -  面试

摘要:Problem Check if a positive integer $n$ can be written as sum of a positive integer and reverse of that integer. Here, reverse of a positive integer i 阅读全文
posted @ 2019-09-23 01:08 Pat 阅读(395) 评论(0) 推荐(0)
摘要:Fisher Yates shuffle Durstenfeld's in place version 现在问题是如何给随机数引擎 一个种子(seed)。常见的办法是用系统时间: 或者 。但是这种方法有争议,见 https://stackoverflow.com/q/36663027/6052725 阅读全文
posted @ 2019-09-18 11:16 Pat 阅读(266) 评论(0) 推荐(0)
摘要:二叉树属于 子节点有序的有根树 . 二叉树的遍历有三种方式: 前序 (pre order) 中序 (in order) 后续 (post order) 这三种遍历方式都是 递归 定义/实现的. 如果给每个节点一个编号, 就可以得到一个节点序列. 常见的问题: 已知前序, 中序, 求后序. 已知后序, 阅读全文
posted @ 2016-09-09 16:13 Pat 阅读(321) 评论(0) 推荐(0)
摘要:extraction from The C++ Programming Language, 4th. edition, Bjarne Stroustrup 1 . If no initializer is specified, a global, namespace, local , or memb 阅读全文
posted @ 2016-09-09 11:17 Pat 阅读(366) 评论(0) 推荐(0)