DIY: Snapshot Array
Explore how to build a SnapshotArray data structure that supports setting values, taking snapshots, and retrieving past values. This lesson helps you develop skills to manage versioned arrays and solve real-world coding problems using Go.
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:
-
newSnapshotArray(length): This property initializes and returns a data structure withlengthnumber of indexes. Initially, the value at each index is0. -
...