Get your own website
Python
C
Java
 
Python result:
C result:
Java result:
Hash Set Contents:
Bucket 0: ['Thomas', 'Jens']
Bucket 1: []
Bucket 2: ['Peter']
Bucket 3: ['Lisa']
Bucket 4: ['Charlotte']
Bucket 5: ['Adele', 'Bob']
Bucket 6: []
Bucket 7: []
Bucket 8: ['Michaela']
Bucket 9: []

'Peter' is in the set: True
Removing 'Peter'
'Peter' is in the set: False
'Adele' has hash code: 5
Hash Set Contents:
Bucket 0: Jens Thomas
Bucket 1:
Bucket 2: Peter
Bucket 3: Lisa
Bucket 4: Charlotte
Bucket 5: Bob Adele
Bucket 6:
Bucket 7:
Bucket 8: Michaela
Bucket 9:

'Peter' is in the set: true
Removing 'Peter'
'Peter' is in the set: false
'Adele' has hash code: 5
Hash Set Contents:
Bucket 0: [Thomas, Jens]
Bucket 1: []
Bucket 2: [Peter]
Bucket 3: [Lisa]
Bucket 4: [Charlotte]
Bucket 5: [Adele, Bob]
Bucket 6: []
Bucket 7: []
Bucket 8: [Michaela]
Bucket 9: []

'Peter' is in the set: true
Removing 'Peter'
'Peter' is in the set: false
'Adele' has hash code: 5