自平衡AVL樹通常使用列表實現。每個節點包含:低內存使用率的自平衡AVL樹?
pointer to parent (8 bytes on 64 bit apps)
pointer to left child (8 bytes on 64 bit apps)
pointer to right child (8 bytes on 64 bit apps)
balance (4 bytes)
pointer to the data struct (8 bytes on 64 bit apps)
因爲數據在內存中的排列,我們需要40 bytes
每個項目。
在我的應用程序需要一)極快的查找,B)非常快的插入和C)低內存佔用。
問題:是否有可能減少自平衡AVL樹數據結構的內存使用量?
溝指針的父。 – StoryTeller
我正在學習如何工作,我不明白爲什麼我的問題是downvoted,有人可以解釋嗎? – SuperHeroY
@StoryTeller:如果我這樣做,我會失去什麼? – SuperHeroY