设置深度:java.util.TreeMap [英] Set Depth : java.util.TreeMap

查看:34
本文介绍了设置深度:java.util.TreeMap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何设置 TreeMap 对象的深度.假设我们正在尝试在 TreeMap 的底层数据结构之上构建一个自动建议功能,我们所知道的树的深度将如何影响性能?

How can we set depth of a TreeMap object. Suppose we are trying to build an auto suggest feature on top of underlying data structure of a TreeMap, how would depth of a tree as we know affect the performance?

推荐答案

你的问题很模糊,但如果我理解正确,你就是在误解概念.TreeMap 是 Map 接口的一个实现,它使用红黑树将其内容按自然升序排序,而您要问的是完全不相关的东西;根据项目在图表中的位置对项目进行排名.

Your question is vague but if I understand correctly, you're misunderstanding concepts. TreeMap is an implementation of the Map interface which uses red-black tree for sorting its contents into natural ascending order while what you're asking is something completely unrelated; ranking items based on their position in a graph.

这篇关于设置深度:java.util.TreeMap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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