摘要: 一.inode 在Linux中,“一切皆文件”。唯一标识文件的是inode而非文件名,文件名仅是为了方便人们的记忆和使用,系统或程序通过 inode 寻找正确的文件数据块。 什么是数据块呢?文件储存在硬盘上,硬盘的最小存储单位叫做"扇区"(Sector)。每个扇区储存512字节(相当于0.5K... 阅读全文
posted @ 2014-03-13 21:48 七年之后 阅读(1659) 评论(0) 推荐(0) 编辑
摘要: Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed at a timeEach intermediate word must exist in the dictionaryFor example,Given:start="hit"end="cog"dict=["hot","dot 阅读全文
posted @ 2014-03-13 13:35 七年之后 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Given two words (startandend), and a dictionary, find the length of shortest transformation sequence fromstarttoend, such that:Only one letter can be changed at a timeEach intermediate word must exist in the dictionaryFor example,Given:start="hit"end="cog"dict=["hot",&q 阅读全文
posted @ 2014-03-13 13:33 七年之后 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is[1, 2, 3, 4]. Return its length:4.Your algorithm should run in O(n) complexity.思考:空间换时间,查找O(1)用unordered_set。class Sol 阅读全文
posted @ 2014-03-13 09:56 七年之后 阅读(201) 评论(0) 推荐(0) 编辑