【题目】
原文:
2.1 Write code to remove duplicates from an unsorted linked list.
FOLLOW UP
How would you solve this problem if a temporary buffer is not allowed?
译文:
从一个未排序的链表中移除重复的项
...
分类:
其他好文 时间:
2014-05-22 12:04:13
阅读次数:
196
当你点击看到这篇文章的时候,你已经得到了祝福。一个来自夜深人静的码农,在2014年5月19号的01:18分,默默为你献上祝福。希望你,我和他,每一个在IT行业中奋斗的人,能找到属于自己一片天空。
在翻译结束完3.2.3这份文档后,首先感谢我的客户经理,当在面试的过程中让我产生翻译文档的想法。也就开始了我第一次翻译技术文档的路程。当刚开始翻译的时候,不知道默默问了多少遍,到底能不能...
分类:
编程语言 时间:
2014-05-22 11:59:43
阅读次数:
267
Java与C++都是面向对象语言,都使用了面向对象思想(例如封装、继承、多态等),由于面向对象有许多非常好的特性(继承、组合等),使得二者都有很好的可重用性。...
分类:
编程语言 时间:
2014-05-22 11:26:35
阅读次数:
319
【题目】
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
You are given a target value to search. If found in the array return its index, otherwise return -1.
You may assume no du...
分类:
其他好文 时间:
2014-05-22 10:43:12
阅读次数:
310
【题目】
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
A partially filled sudoku which is valid.
Note:
A valid Sudoku board (par...
分类:
其他好文 时间:
2014-05-22 09:58:54
阅读次数:
234
【题目】
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 the array.
Here are few examples.
[1,3,5,6], 5 → 2
[1,3,5,6]...
分类:
其他好文 时间:
2014-05-22 09:41:59
阅读次数:
195
【题目】
原文:
2.2 Implement an algorithm to find the nth to last element of a singly linked list.
译文:
实现一个算法从一个单链表中返回倒数第n个元素。
【分析】
【思路一】
(1)创建两个指针p1和p2,指向单链表的开始节点。
(2)使p2移动n-1个位置,使之指向从头...
分类:
其他好文 时间:
2014-05-22 09:03:53
阅读次数:
315
【题目】
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found in the array, return [-1, -1].
For example,
Given [5...
分类:
其他好文 时间:
2014-05-22 06:44:39
阅读次数:
265
1.vmlinux
vmlinux是一个包含linux kernel的静态链接的可执行文件,文件类型是linux接受的可执行文件格式之一(ELF、COFF或a.out)。
2.vmlinuz
vmlinuz是可引导的,压缩的linux内核,“vm”代表的“virtual memory”。vmlinuz是vmlinux经过gzip和objcopy(*)制作出来的压缩文件。vmlinuz不仅是一个压缩文件,而且在文件的开头部分内嵌有gzip解压缩代码。所以你不能用gunzip 或 gzip –dc解...
分类:
系统相关 时间:
2014-05-21 03:06:50
阅读次数:
429
今天在伯乐在线 一道面试题看 HashMap 的存储方式,也即使问:在 HashMap 中存放的一系列键值对,其中键为某个我们自定义的类型。放入 HashMap 后,我们在外部把某一个 key 的属性进行更改,然后我们再用这个 key 从 HashMap 里取出元素,这时候 HashMap 会返回什么?如何面试者直接答“这要看自定义类型的hash值了”,我想面试官会非常满意,抓住问题关键很重要。联...
分类:
编程语言 时间:
2014-05-20 14:44:43
阅读次数:
321