Re: [algogeeks] Google telephone interview question

2010-05-28 Thread Anand
DFS will do the same. and form a list. Thanks, Anand On Thu, May 27, 2010 at 9:35 PM, Sathaiah Dontula wrote: > How about doing like below ?. > > Go by sector by sector and check the links of it, it has the link check the > next and form the list, you will get the links like below and construct

Re: [algogeeks] Google telephone interview question

2010-05-28 Thread Sathaiah Dontula
How about doing like below ?. Go by sector by sector and check the links of it, it has the link check the next and form the list, you will get the links like below and construct the sector 1 from it and link, 1. sec7->sec9 -> sec11 -> null, 2. sec12-> null Thanks, Sathaiah On Fri, May 28, 20

Re: [algogeeks] Google telephone interview question

2010-05-28 Thread Anand
The answer would be to run DFS over all the sectors of the Disk. By running the DFS over all sectors we would know which all sectors are connected to each other and could easily restore the first sector information. Thanks, Anand On Thu, May 27, 2010 at 11:28 AM, Atul Kumar wrote: > There is a f

Re: [algogeeks] Google telephone interview question

2010-05-27 Thread sharad kumar
@if we knwaddress of sec7 and sec9 then we can make use of XOR to calculate the address of sec1 On Thu, May 27, 2010 at 11:58 PM, Atul Kumar wrote: > 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 d

[algogeeks] Google telephone interview question

2010-05-27 Thread Atul Kumar
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 la