hashing method used - complexity : 2n