Question d’entretien chez Bottomline

Difference between sets and list? Compare performance of treeMap and HashMap

Réponse à la question d'entretien

Utilisateur anonyme

9 août 2024

List allow duplicates and sets does not search time in list - O(n) Search time in Sets - O(1) TreeMap stores data in ascending order of keys whereas hashmap does not Search, insert and delete time of hashmap is - O(n) TreeMap - O(log(n))