NVIDIA interview question

array with set,get,setall with o(1) time complex