Implemented the book-specified partition (partition and partition1) and the actual partition (partition2)