Persistant Data Structures - Lecture 1


The first lecture on persistent data structures was like stepping into a time machine for data, where every change creates a new version without erasing the old ones. It's like having an undo button that doesn’t stop at just one undo – it's the Git of data structures!




In this class, we learned how persistent data structures let us retain previous versions of data even after modifications, making it a playground for historians and cautious coders alike. It's as if your data is telling stories about its own evolution






-------------------------------------------------------------------------------------------


1.Partial Persistent Data Structure:  this is a type of DS, whereby we can store different versions of our data, but the catch is that we can only update the latest version of the data.

code Implementation description:
persistent data structure using linked lists (PPDS). It allows for efficient insertion and deletion operations while preserving previous versions of data by creating new vertices for each modification. This implementation demonstrates the concept of immutability and historical tracking in data management through a straightforward linked list approach. Github Link


2. Full Persistent Data Structure: this method has a system where you can update all versions.

code Implementation description:
The FPDS (Full Persistent Data Structure) implemented using linked lists in Python tracks versions of data through vertices, each containing an array (`data`) and a version identifier (`version`). Operations like insertion and deletion create new versions while maintaining a linked history, enabling efficient historical data management. This approach facilitates dynamic data modifications with immutable version tracking, demonstrating robust persistence in data structure design. Github Link


3. Confluent Persistent Data Structure: in this mehtod we have this ability to merge multiple versions together and make a new version out of it.

code Implementation description:
The `CPDS` class implements a Concurrent Persistent Data Structure using linked lists (`Node` objects) to manage versions of tasks. It supports operations for inserting tasks into the latest version, creating new versions for each day, and merging existing versions. This structure allows for efficient tracking and manipulation of task versions while maintaining historical data integrity. Github Link

4. functional Persistent Data Strucure: here its totally different if you wanna perform any action say update or delete or whatever you have to create a new version,

code Implementation description:
The `FPDS` class utilizes a linked list of `Node` objects to implement a Full Persistent Data Structure in Python. It supports operations for inserting and deleting data elements, which create new versions of the structure while maintaining historical integrity. The class also provides a method to traverse and display the latest version of data stored in the structure, showcasing its ability to manage and track changes effectively across versions. Github Link


-----------------------------------------------------------------------------------------------------------------------------
Thanks for reading!















Comments