Class with 3 functions: add(int index, int value), get(int index), set(int index, int value). Set( int value)
The second set function set the new value to all variables who added before
You need to implement all the functions.
You need to implement set function in o(1) run time