In video bhaiya take unordered_map is we take only map or can we choose anything

in video bhaiya take unordered_map is we take only map or can we choose anything

@Aditya-Kushwaha-914550392281281 no you cannot choose map because unordermap is implementation of Hashing where Map is implementaion of Trees if you know there is something special about Hashing you can access, delete and Insert in O(1) but not in Tree.

Yes you can use other data structure like array of pointer of linklist in every container of array you can store the address of Linklist where each linklist store the neighbours of that node.
There are more such way but for a generic implementation and Clean code this implementation is best.