java - how to convert a list into an avl tree -



need change list interface avl-tree. know how avl tree works, still don't get, how save data in structure.

is neccessary still keep id of old list items , link them avl tree?
writing small rpg, quests , events saved in 2 lists , got different ids.

this how items list:

public item getitem(int i) {   if (i < 0 || >= length()) {     throw new indexoutofboundsexception(string.format("%d / %d", i, length()));   }   if (i <= 0) {     return firstitem();   } return next.getitem(--i); } 


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -