Wrong time complexity for hashtable

In the "Implement Trie - Solution", it says that "The time complexity to search in hash table is typically O(1), but will be O(logN) in the worst time if there are too many collisions and we solve collisions using height-balanced BST."
Should the worst time is O(M logN), where M is the average length of words and logN is the height of balanced BST?

Comments (0)