Shouldn't this check the edge from index `0` to index `pArray.length - 1`?