10b Comparison Table

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Property Hash Map Linked Hash Map Tree Map

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.

Interface Map Map Map, Sorted Map and


Navigable Map
None, use None, use None, use
Synchronization Collections. Synchronized Collections. Synchronized Collections. Synchronized

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.

used where concurrency is For full Arranged Course Msg us on this


telegram id
involved. @msgmeheree

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy