Skip to main content

Questions tagged [persistent-data-structure]

A persistent data structure is a data structure that is never modified in place, but by creating a new data structure.

2 votes
0 answers
118 views

I am wondering if there can be such a thing as a persistent data structure for sequences that a) supports the following operations: insert(index, elem) in $O(log\, ...
Steven Obua's user avatar
0 votes
1 answer
96 views

As title, I'm trying to implement a text editor with the rope data structure, which is backed by binary search tree. Since I want it to have persistent undos, the underlaying data structure should ...
lyhokia's user avatar
3 votes
1 answer
83 views

When introducing formal semantics for data structures, immutable stacks are a nice simple example : $\mathit{is\_empty}(\mathit{create()})=\mathrm{True}$ $\mathit{is\_empty}(\mathit{push}(e, s))=\...
ysalmon's user avatar
  • 233
2 votes
0 answers
87 views

Persistent (aka immutable) data structures in functional programming sidestep issues of shared memory mutual exclusion, and thus also issues such as data races that arise and which may be difficult to ...
Krishnamoorthy Iyer's user avatar
3 votes
0 answers
240 views

Are there any standard persistent data structures that facilitate the following? tabulating, for each arc in a rooted, oriented, acyclic multigraph, the set of root-emanating paths containing the arc ...
Polytope's user avatar
  • 113
2 votes
0 answers
88 views

I am seeking a data structure that maintains an array of N numbers and supports the following two operations: Double the first i numbers Subtract the first i numbers of a previous version from the ...
sunny-lan's user avatar
  • 121
0 votes
0 answers
619 views

Given an array $A$ of length $N$. There are $Q$ queries, each queries will be in the form ...
Sirawit 'Plum' P.'s user avatar
1 vote
0 answers
85 views

Given a persistent red-black tree, I've been searching for an algorithm, approach, or equivalent data structure that allows me to efficiently merge two instances of the tree produced by divergent ...
Noah Watkins's user avatar
4 votes
1 answer
233 views

From my limited understanding fully persistent data structures allow changes to be made to previous nodes, with new nodes creating a branch rooted at the changed node, resulting in a tree of nodes and ...
Bauhaus's user avatar
  • 143
3 votes
2 answers
2k views

My competitive programming coach told me of a balanced binary tree used by a lot of Chinese competitors that has all the functions of any other balanced binary tree and is fully persistent and runs ...
Jack Pan's user avatar
  • 133
3 votes
2 answers
187 views

I'm quite new to understanding persistent data structures, so bear with me. Consider some database with data of the form $(\text{id}, d_1, d_2)$. The last two could e.g. mean production data and ...
Eff's user avatar
  • 219
5 votes
2 answers
767 views

Most books on data-structures will briefly introduce heaps (aka priority queues) and then move to describe the "trick" allowing heaps to be implemented as arrays. I've been looking for a way ...
wvxvw's user avatar
  • 1,388
3 votes
1 answer
128 views

I'm writing a data structure library, and I want to write an efficient algorithm for adding many elements to a finger tree (from an iterable sequence). I'm going to do this by constructing a finger ...
GregRos's user avatar
  • 525
0 votes
0 answers
113 views

I would like to find an immutable/persistent data structure that allows efficient updating for 2d (or higher) lattices/arrays/matrices, and reasonable performance when appending in any direction. ...
Justin Kaeser's user avatar
4 votes
2 answers
703 views

I read the paper about Relaxed Radix Balanced trees (RRB trees) and am trying to implement them. What I can't get is how insertion at an index should be performed step by step. Can anyone proficient ...
Tvaroh's user avatar
  • 255

15 30 50 per page