我已经知道如果你试图找到具有特定键的项目,最坏情况的运行时间是O(n),n节点的数量.如果您尝试按其键的顺序打印出所有数据项,则最坏情况的运行时间为O(n).如果您尝试搜索特定数据项(您不知道密钥),则最坏情况的运行时间为O(n).但是,如果键和数据都是整数,则输入项在插入之前随机加扰.最糟糕的运行时间是否仍然相同?
O(n)
n
random big-o time-complexity binary-search-tree data-structures
big-o ×1
binary-search-tree ×1
data-structures ×1
random ×1
time-complexity ×1