TreeMap-搜索时间复杂度 [英] TreeMap - Search Time Complexity

查看:280
本文介绍了TreeMap-搜索时间复杂度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TreeMap中的get()和put()的时间复杂度是多少?

What is the time complexity of a get() and put() in a TreeMap?

实现与红黑树相同吗?

推荐答案

从此处:

此实现提供 保证的log(n)时间成本 containsKey,获取,放置和删除 操作

This implementation provides guaranteed log(n) time cost for the containsKey, get, put and remove operations

这篇关于TreeMap-搜索时间复杂度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆