Low Level Design, Object Oriented, Graph Data Structure, Hashmap, Interview Questions.
relationships Hash Map — Delete X from all Hash Maps with X.id as the key. For Hash Maps where X is a value, update those Hash Maps too to remove any reference to X. If the key does not have any value after removing X, then delete the key too from Hash Map (although this is a special requirement