Update partition.cpp