Both a sorted array and a binary tree can let you look up an element in log(N) time. However I would expect a sorted array to be faster in practice because of the constant factor. However inserting ...
Listing 1. Iteration over a sorted binary tree using recursive descent in an enumeration method. public interface KeyValueTask { void apply(String key, String value ...