Exercise 4.2

Horiz_Part algorithm