Completed array paritiion problem