better array initialization
method to split a list on a pivot