# 算法代写｜COMP2721 Algorithms and Data Structures Coursework 1

Q 1: (4 points)

RAID systems can support replacing failed disks without the system going offline. Which of the RAID lev
els better support this operation with the least amount of interference between the rebuild and ongoing disk

Q 2: (4 points)

Consider the following arrangement for four disks, where Bi is a data block, and Pi is the parity block for
the 4 data blocks that precedes it. What problem will this arrangement cause?

Q 3: (8 points)

Consider the following file organization using free list.

Show the structure of the file after each of the following operations (they follow one another):

(a) Delete record 11. (2 marks)

(b) Insert (12345, John, History, 90000) (3 marks)

(c) Insert (20000, Jamie, Physics, 100000). (3 marks)

Q 4: (3 points)

In variable-length record representation, the record starts with offset and length pairs of variable-size attributes,
followed by fixed-size attributes, then the null bitmap, and finally the variable-size attributes. How can we im
prove this representation if our application is expected to store tables with large number of attributes, most of
which are nulls?

Q 5: (12 points)

Construct a B+-tree for the following set of key values: (2, 3, 5, 7, 11, 17, 19, 23, 29, 31). The tree is
initially empty and values are added one value at a time in ascending order. Consider the following values of
n:

(a) n = 4. (4 points)
(b) n = 6. (4 points)
(c) n = 8. (4 points)