Skip to content

Instantly share code, notes, and snippets.

@ankitml
Created March 15, 2017 09:03
Show Gist options
  • Save ankitml/6a44f09059ba66205d936bfe062854cb to your computer and use it in GitHub Desktop.
Save ankitml/6a44f09059ba66205d936bfe062854cb to your computer and use it in GitHub Desktop.
Partially persistent data structures

Partially persistent Data Structures are the ones where we can go back and look at how the data looked like in history.

For this assignment, you have to implement Partially persistent Data structure (dictionary) in python, with any data store (redis, mongoDB, etc) with the following features.

  1. A way to get latest state of dictionary. Or latest value of any key in dictionary.
  2. A way to get historical version of dictionary.
  3. History of any key in the dictionary.
  4. Update the dictionary to a new version.

Drop in replacement to a standard dictionary in python 3 is desirable but not necessity.

For further reading of Partially persistent Data Structures, two papers are given with this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment