Partition Algorithm Time Complexity Questions