Implement an in-memory record store with fetch, TTL and backup and restore.
Unlock detailed company stats for this questionUpgrade
Implement an in-memory data storage system that supports basic operations, filtering and point-in-time recovery, built up in levels.
Level 1:
SET_OR_INC(key, field, value)updates a string field or increments an integer field.GET(key, field)returns the field value.DELETE(key, field)removes a field, or the whole key if no fields remain.
Level 2: FETCH(field, value) scans records and returns the matches, formatted as a string like "field1(val1), field2(val2)" and sorted alphabetically by key.
Level 3: either TTL on SET (expired records behave as deleted on GET or FETCH) or multi-field filtering by prefix or range.
Level 4: BACKUP() captures the state and returns a backupId; RESTORE(backupId) reverts to that state instantly.
Format · CodeSignal industry coding assessment, scored out of 600.
Community answers
No answers contributed by the community yet.


