[ 问题: ]
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were
inserted in order. You may assume no duplicates in th...
分类:
其他好文 时间:
2014-07-22 23:01:15
阅读次数:
270
1. 安装包下载:wps官网的 debian .deb 包
2 根据wifi说明,需要一下三个lib:
libtiff.so.4
libpng12.so.0
libjpeg.so.62
通过以下命令查看是否具备:
liaoqianwen@liaoqianwen-F80S:~ aptitude search libtiff
如果没有,安装:
liao...
分类:
其他好文 时间:
2014-07-22 22:59:35
阅读次数:
343
Instructionshereare not great.First shut down
ST2.Make sure you use absolute paths for symlink:e.g.$ curl -kL
http://xrl.us/pythonbrewinstall | bash$ ...
分类:
其他好文 时间:
2014-05-02 11:01:23
阅读次数:
382
Write an efficient algorithm that searches for
a value in anmxnmatrix. This matrix has the following properties:Integers in
each row are sorted from l...
分类:
其他好文 时间:
2014-05-02 10:41:53
阅读次数:
267
Given a sorted array and a target value, return
the index if the target is found. If not, return the index where it would be if
it were inserted in or...
分类:
其他好文 时间:
2014-05-02 09:54:11
阅读次数:
269
git log 的用法,具体参考 git log --help,以下是个人在使用中遇见的问题,略作统计。
查看单个文件的修改差异(类似于查看单个文件的log,同时将每次log 的详细记录都显示出来):
--full-diff
Without this flag, git log -p ... shows commits that touch the specified paths,...
分类:
其他好文 时间:
2014-05-01 18:33:15
阅读次数:
324
Ternary Search Tree C++实现...
分类:
编程语言 时间:
2014-05-01 17:51:59
阅读次数:
410
一、 序言
上一篇文章中,给出了 trie 树的一个实现。可以看到,trie 树有一个巨大的弊病,内存占用过大。
本文给出另一种数据结构来解决上述问题---- Ternary Search Tree (三叉树)
二、数据结构定义
Trie 树中每个节点包含了 26 个指针,但有很大一部分的指针是 NULL 指针,因此浪费了大量的资源。
一种改进措施就是,以一棵树来代替上述的指针数组。...
分类:
其他好文 时间:
2014-05-01 17:49:30
阅读次数:
326
原题链接: http://oj.leetcode.com/problems/unique-binary-search-trees/
这道题要求可行的二叉查找树的数量,其实二叉查找树可以任意取根,只要满足中序遍历有序的要求就可以。从处理子问题的角度来看,选取一个结点为根,就把结点切成左右子树,以这个结点为根的可行二叉树数量就是左右子树可行二叉树数量的乘积,所以总的数量是将以所有结点为根的可行结果...
分类:
其他好文 时间:
2014-04-30 22:12:39
阅读次数:
244
泛型的Binary Search Tree的实现,并与STL map进行操作性能上的比较...
分类:
其他好文 时间:
2014-04-29 13:27:22
阅读次数:
420