Fixed run error

Fixed run error and added pseudo code for one dimensional partitioning.