4
44
390
41K
329
Download Image
@theskilledcoder Hashmap uses two types of data structures(linked list and self balanced bst) to store the value of key having same hash value to optimize the avg time complexity.
@theskilledcoder I would add - using lambda expressions is relatively expensive. Although they look like blocks of code, they are not. Each call to a lambda expression requires loading a class, creating an instance, and calling a method.
@theskilledcoder I would add - use of streams is expensive as it involves a lot of internal processing and heavy use of lambda's. So use streams only if you have to e.g. don't replace simple loops.