New validation method indexInList.
added a quickselect implementation