sclass LogNArray extends RandomAccessAbstractList { class Node { O a, b; // Node or A int size; int get(int i) { if (i >= a) } } bool empty; O root; int nodeSize(O o) { if (o cast Node) ret o.size; ret 1; } public int size() { if (empty) ret 0; if (root cast Node) ret root.size; ret 1; } public A get(int i) { if (i < 0 || empty || i >= size()) throw new IndexOutOfBoundsException(); if (root cast Node) { ret node.get(i); } ret (A) root; } }