Affirm Interview Question

had to implement O(1) insert/delete/random access.