Low Level Design, Object Oriented, Graph Data Structure, Hashmap, Interview Questions.
and ‘Graph’ for representing the Graph: Node class class Node: def __init__(self, id, type, attributes=None): self.id = id self.type = type self.uid = (self.id, self.type) self.attributes = attributes def __hash__(self): return hash(self.uid) def __eq__(self, other): return self.uid == other.uid