for find() , the complexity is O(logn)

Usually it is implemented as a red-black tree.