Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Hash Map Contents:
Bucket 0: [('123-4569', 'Jens')]
Bucket 1: []
Bucket 2: [('123-4570', 'Peter')]
Bucket 3: [('123-4571', 'Lisa')]
Bucket 4: []
Bucket 5: [('123-4672', 'Adele'), ('123-4573', 'Michaela')]
Bucket 6: []
Bucket 7: []
Bucket 8: [('123-4567', 'Charlotte'), ('123-6574', 'Bob')]
Bucket 9: [('123-4568', 'Thomas')]

Name associated with '123-4570': Peter
Updating the name for '123-4570' to 'James'
Name associated with '123-4570': James
Hash Map Contents:
Bucket 0: (123-4569: Jens)
Bucket 1:
Bucket 2: (123-4570: Peter)
Bucket 3: (123-4571: Lisa)
Bucket 4:
Bucket 5: (123-4573: Michaela) (123-4672: Adele)
Bucket 6:
Bucket 7:
Bucket 8: (123-6574: Bob) (123-4567: Charlotte)
Bucket 9: (123-4568: Thomas)

Name associated with '123-4570': Peter
Updating the name for '123-4570' to 'James'.
Name associated with '123-4570': James
Hash Map Contents:
Bucket 0: [123-4569: Jens]
Bucket 1:
Bucket 2: [123-4570: Peter]
Bucket 3: [123-4571: Lisa]
Bucket 4:
Bucket 5: [123-4672: Adele] [123-4573: Michaela]
Bucket 6:
Bucket 7:
Bucket 8: [123-4567: Charlotte] [123-6574: Bob]
Bucket 9: [123-4568: Thomas]

Name associated with '123-4570': Peter
Updating the name for '123-4570' to 'James'
Name associated with '123-4570': James