Low Level Design, Object Oriented, Graph Data Structure, Hashmap, Interview Questions.
expensive but sometimes necessary. One thing worth mentioning in the above solution is that we implicitly assumed that each requirement will be returned to us in the most time efficient complexity possible i.e. O(1) or O(logN). In that process, we tried to compromise on the space complexity by