Solved! Leetcode 1146. Snapshot Array

source: https://leetcode.com/problems/summary-ranges/description/ Snapshot Array Table of ContentsSnapshot ArrayDescriptionExample 1:Constraints:Solution Description Implement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializes an array-like data structure with the given length. Initially, each element equals 0. void set(index, val) sets the element at the given index to be equal to val. int snap() takes a snapshot of ...