worst case in hashmap in O(n) S your time complexity in worst case is O(n^3)