DIY: Snapshot Array
Explore how to implement a Snapshot Array in Elixir, complete with initialization, setting values, taking snapshots, and retrieving data. This lesson helps you understand and apply a practical data structure essential for coding interviews.
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:
-
init(length): This property initializes a data structure withlengthnumber of indexes. Initially, the value at each index is0. -
set_value(obj,idx,val): This ...