Class RadixTrie
java.lang.Object
com.csse3200.game.ui.terminal.autocomplete.RadixTrie
Compressed (radix) trie with per-node cached top-5 completions.
Insert all command names once; suggestions are then O(m + k) where:
- m = prefix traversal, k = number of edges inspected on the path.
Returns at most 5 suggestions in lexicographic order.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RadixTrie
public RadixTrie()
-
-
Method Details
-
clear
public void clear() -
insert
-
suggestTopK
-