上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 num2) 22 return 1;23 else if (num1 ... 阅读全文
posted @ 2015-08-26 09:48 胡潇 阅读(1124) 评论(0) 推荐(0) 编辑
摘要: mmap基础概念mmap是一种内存映射文件的方法,即将一个文件或者其它对象映射到进程的地址空间,实现文件磁盘地址和进程虚拟地址空间中一段虚拟地址的一一对映关系。实现这样的映射关系后,进程就可以采用指针的方式读写操作这一段内存,而系统会自动回写脏页面到对应的文件磁盘上,即完成了对文件的操作而不必再调用... 阅读全文
posted @ 2015-07-20 10:35 胡潇 阅读(268571) 评论(36) 推荐(161) 编辑
摘要: 系统调用操作系统的主要功能是为管理硬件资源和为应用程序开发人员提供良好的环境,但是计算机系统的各种硬件资源是有限的,因此为了保证每一个进程都能安全的执行。处理器设有两种模式:“用户模式”与“内核模式”。一些容易发生安全问题的操作都被限制在只有内核模式下才可以执行,例如I/O操作,修改基址寄存器内容等... 阅读全文
posted @ 2015-07-19 12:24 胡潇 阅读(67776) 评论(17) 推荐(65) 编辑
摘要: 由于倒排索引文件往往占用巨大的磁盘空间,我们自然想到对数据进行压缩。同时,引进压缩算法后,使得磁盘占用减少,操作系统在query processing过程中磁盘读取效率也能提升。另外,压缩算法不仅要考虑压缩效果,还要照顾到query processing过程的解压缩效率。总的来说,好的索引压缩算法需... 阅读全文
posted @ 2015-07-17 08:08 胡潇 阅读(7237) 评论(1) 推荐(2) 编辑
摘要: Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].解题... 阅读全文
posted @ 2015-06-30 04:29 胡潇 阅读(295) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr... 阅读全文
posted @ 2015-06-29 04:15 胡潇 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ... 阅读全文
posted @ 2015-06-27 21:18 胡潇 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"Corner Cases:Did you con... 阅读全文
posted @ 2015-06-25 10:30 胡潇 阅读(204) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2015-06-24 02:59 胡潇 阅读(274) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ... 阅读全文
posted @ 2015-06-23 03:40 胡潇 阅读(253) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页