quick sort erroring with 1million elements