Starting array index algorithm
solved via adding both sided around pivot