Java Two-Way Linked Set data-structure [duplicate]

时光毁灭记忆、已成空白 提交于 2019-12-10 17:34:39

问题


Is there an implementation of the following data-structure already implemented in Java:

Say I want the set for '2' ('A', 'C', 'D') but I also want the set for 'A' ('1', '2')


回答1:


You have no such data structure in the Java Collections Framework.

I suggest you the guava library you may find something useful there.

Note that what you have here is essentially a undirected graph so keep an eye out for graph libraries (for example JGraphT), or write your own.



来源:https://stackoverflow.com/questions/20002495/java-two-way-linked-set-data-structure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!