Adds pivot index with hash method along with tests for pivot index = -1