private Node<T> growAndGetNode(final int position) {
        while (position >= nodes.size()) {
            nodes.add(new Node<>());
        }
        final Node<T> node = nodes.get(position);
        node.empty = false;
        return node;
    }
A Huffman tree implemented as 1 array for high locality of reference.
src/main/java/org/apache/commons/imaging/formats/tiff/itu_t4/HuffmanTree.java