10b Comparison Table
10b Comparison Table
10b Comparison Table
marinatannyachakma692@gmail.com
Time
Complexity (Big O
notation) Get, Put, O(1) O(1) O(1)
Contains Key and
Remove method
Sorted according to either Sorted according to either
Insertion Order of Access natural Order of keys or
Iteration Order Random Order (as specified during comparator(as specified
construction) during construction)
Not allowed if keys uses
Natural Ordering or
Comparator does not support
Null Keys allowed allowed comparison on null Keys.
Tele Id @msgmeheree
Map()
Map() Map()
Red-Black( a kind of self-
List of buckets, if more than 8 balancing binary search tree)
entries in bucket then Java 8 implementation of Binary
Data Structure will switch to balanced tree Doubly Linked List of Buckets Tree. This data structure
from linked list offers O(log n ) for insert,
Delte and Search operations
and O(n) space complexity.
Algorithms where Sorted or
General Purpose, fast retrieval, Can be used for LRU cache, Navigable features are
Applications non-synchronized. other places where insertion required. For example, find among the list
of employees whose salary is next to given
Concurrent Hash Map can be or access order matters employee, Range Search, etc.
Comparator needs to be
supplied for key
Requirements for Equals() and hash Code() Equals() and hash Code() implementation, otherwise
Keys needs to be overwritten. needs to be overwritten. natural order will be used to
sort the keys.
For full Arranged Course Msg us on this telegram id
@msgmeheree