In this challenge, you have to implement a SnapshotArray with the following properties:
SnapshotArray(length): This property initializes a data structure with length number of indexes. Initially, the value at each index is 0.
set(idx,val): This property sets the value at a given index idx to val.
snap: This property takes no parameters and returns the snapid. snapid is the number of times that the snapshot function was called minus 1.
get(idx,snapid) function returns the value at the index idx with the given snapid.