由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - [Google算法题] reconstruct sector
相关主题
一道面试题,请大家给些意见yahoo onsite
同学今天面AMAZON到一个题目不会 问我。我来这问一下h1 换工作
大文件去重复,有什么好办法么OPT-H1B gap 处理, 我还是不太明白
探讨加请教:我工作中的一道题employment opportunities in the financial sector/services
发个我总结的unix常用命令在线的ID好多,但还是好安静啊
如果python command line positional arguments 里有些是运算EB2的Prevailing wage要求是多少?
等微软onsite结果,求bless(附面经)瞎投简历来了个面试
Amazon phone interview Software Engineering Intern关于skill set
相关话题的讨论汇总
话题: sector话题: file话题: null话题: sec1
进入JobHunting版参与讨论
1 (共1页)
d********w
发帖数: 363
1
http://geeksforgeeks.org/forum/topic/google-interview-question-
software-engineerdeveloper-about-algorithms-15
There is a file system on the disc. the disc has many sectors. Always
the first sector has the information about all the files.
A file data is divided into sectors. Each sector can have data from a
single file.
Each sector has 2 parts, data and the pointer to the next sector of the
file. Every last sector in the file has next pointer as null.
say a disk has 18 sectors numbered 1 to 18.
then the first sector would have this information about the file.
file1 = sec1 -> sec7->sec9 -> sec11 -> null
file2 = sec10 -> sec12-> null
etc.
Now the first sector has some error. Write an algo to reconstruct the
file information in the first sector. Write code in C.
我没懂题目意思,first sector出错如何重建?
n********y
发帖数: 66
2
file1 = sec1 -> sec7->sec9 -> sec11 -> null
file2 = sec10 -> sec12-> null
file1 should start from sec2 ?
For example
Sec1.block1: 2
block2: 10
block3: null
These data are lost. So we scan from Sec2, then follow pointer to 2,7,9,11
and record these positions. Write all the information as file1 to Sec1. Then
from next sector in 2-17 not used, do same thing.
when you're done, you get a your Sec1 back.
1 (共1页)
进入JobHunting版参与讨论
相关主题
关于skill set发个我总结的unix常用命令
米国的offer和工作基本不受保护如果python command line positional arguments 里有些是运算
真心求教on-site interview时间问题等微软onsite结果,求bless(附面经)
被DREAM COMPANY拒了,极度郁闷Amazon phone interview Software Engineering Intern
一道面试题,请大家给些意见yahoo onsite
同学今天面AMAZON到一个题目不会 问我。我来这问一下h1 换工作
大文件去重复,有什么好办法么OPT-H1B gap 处理, 我还是不太明白
探讨加请教:我工作中的一道题employment opportunities in the financial sector/services
相关话题的讨论汇总
话题: sector话题: file话题: null话题: sec1