Quiz 16 (Exercises for Chap. 20: (Hashing)

Suppose that the hash codes for certain objects are as given below Now assume that the buckets array is of size 10. Draw the buckets array assuming it is for a set and the following insertions are made:
  1. set.add(a) ;
  2. set.add(b) ;
  3. set.add(c) ;
  4. set.add(d) ;
  5. set.add(a) ;
  6. set.add(b) ;
  7. set.add(e) ;
  8. set.add(f) ;
  9. set.add(g) ;
  10. set.add(h) ;
  11. set.add(i) ;
  12. set.add(j) ;