This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <assert.h> | |
| #include <malloc.h> | |
| //"A Persistent Union-Find Data Structure" (just the Persistent Array) | |
| //https://usr.lmf.cnrs.fr/~jcf/publis/puf-wml07.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| //Iterative Relaxed B+Tree | |
| //Just pedagogical. Based off Per Vognsen's B+Tree code | |
| //https://gist.github.com/pervognsen/e7883b3de183fcd601c1edf7f7e9508b | |
| // cl -Zi -Od /INCREMENTAL:NO persistent_btree.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| //Partially Persistent B+Tree | |
| //Just pedagogical. Based off Per Vognsen's B+Tree code | |
| //https://gist.github.com/pervognsen/e7883b3de183fcd601c1edf7f7e9508b | |
| // cl -Zi -Od /INCREMENTAL:NO persistent_btree.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| //Partially Persistent B+Tree | |
| //Just pedagogical. Based off Per Vognsen's B+Tree code | |
| //https://gist.github.com/pervognsen/e7883b3de183fcd601c1edf7f7e9508b | |
| // cl -Zi -Od /INCREMENTAL:NO persistent_btree.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| #include <windows.h> | |
| //Partially Persistent Red-Black Tree | |
| //Imperative implementation of "Faster, Simpler Red-Black Trees" by Cameron Moy | |
| //Implemented using Zippers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| #include <string.h> | |
| //Imperative implementation of "Faster, Simpler Red-Black Trees" by Cameron Moy | |
| //https://ccs.neu.edu/~camoy/pub/red-black-tree.pdf | |
| //https://github.com/zarif98sjs/RedBlackTree-An-Intuitive-Approach | |
| //https://ranger.uta.edu/~weems/NOTES5311/sigcse05.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function leak_hole() { | |
| let x; | |
| delete x?.[y]?.a; | |
| return y; | |
| let y; | |
| } | |
| function pwn() { | |
| let hole = leak_hole(); | |
| %DebugPrint(hole); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| #include <assert.h> | |
| //https://sedgewick.io/wp-content/themes/sedgewick/papers/2008LLRB.pdf | |
| //Partially Persistent Left-leaning Red-Black Tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| #include <assert.h> | |
| //Just pedagogical. No proper memory managagement here, would use Arenas in practice | |
| #define NODE_CHILD_COUNT 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <malloc.h> | |
| #include <assert.h> | |
| //Partially Persistent Left-Leaning Red-Black Tree | |
| //Implemented using Zippers | |
| //https://sedgewick.io/wp-content/themes/sedgewick/papers/2008LLRB.pdf |
NewerOlder