DIY: Snapshot Array
Solve the interview question "Snapshot Array" in this lesson.
We'll cover the following...
We'll cover the following...
Problem statement
In this challenge, you have to implement a snapshotArray with the following properties:
-
constructor(length): This property initializes a data structure withlengthnumber of indexes. Initially, the value at each index is0. -
set_value(idx, val)...