C : beats 100% - no built-in Data Structures, etc - simple n short
\n#define SZ  50000\n\nstruct v {\n    int v, i;\n    struct v *n;\n};\n\ntypedef struct {\n    struct v *vl[SZ];\n    int i;\n} SnapshotArray;\n\nSnapshotArray
```\n#define SZ  50000\n\nstruct v {\n    int v, i;\n    struct v *n;\n};\n\ntypedef struct {\n    struct v *vl[SZ];\n    int i;\n} SnapshotArray;\n\nSnapshotArray* snapshotArrayCreate(int length) {\n    return calloc(1, sizeof(SnapshotArray));\n}\n\nvoid snapshotArraySet(SnapshotArray* obj, int index, int val) {\n    SnapshotArray *s = obj;\n    struct v *v = s->vl[s->i], *p = NULL;\n    for (; v && index > v->i ; p = v, v = v->n);\n    if (v && index == v->i)\n        v->v = val;    \n    else {\n        struct v *n = calloc(1, sizeof *n);\n        n->v = val;\n        n->i = index;    \n        n->n = v;\n        p ? p->n = n : (s->vl[s->i] = n);\n    }\n}\n\nint snapshotArraySnap(SnapshotArray* obj) {\n    SnapshotArray *s = obj;\n    struct v *h = s->vl[s->i++];\n    for (struct v **p = &s->vl[s->i] ; h ; h = h->n) {\n        (*p = calloc(1, sizeof **p))->v = h->v;\n        (*p)->i = h->i;\n        p = &(*p)->n;\n    }\n    return s->i - 1;\n}\n\nint snapshotArrayGet(SnapshotArray* obj, int index, int snap_id) {\n    SnapshotArray *s = obj;\n    struct v *h;\n    for (h = s->vl[snap_id] ; h && h->i < index ; h = h->n);\n    return h && h->i == index ? h->v : 0;\n}\n\nvoid snapshotArrayFree(SnapshotArray* obj) {\n    free(obj);\n}\n```
['C']