Refactored the sorting, need to split the individualArr and take the
numParent-nth elements