The document describes an implementation of catenable double-ended queues using recursive slowdown. It presents two implementations: a simple one using a recursive data type Cat to represent the queues, and an improved one that embeds the queues within a compound element Ele to achieve logarithmic time concatenation. The improved implementation handles concatenating and tailing operations on the compound queues in various cases.
The document describes an update to the binary random-access list data structure presented in section 9.2.1. The update allows updating elements in the list by passing a function, rather than a new value, to avoid re-traversing the list on each update. This improves the time complexity of the update operation from O(log^2 n) to O(log n).
The document describes different types of data structures including stacks, queues, deques, and output-restricted deques. It provides functions for adding and removing elements from both ends of these structures, such as cons to add to the front, snoc to add to the back, and tail to remove from the back. Specifically for output-restricted deques, snoc adds an element to the back by checking length constraints, and cons adds to the front by incrementing the front length.
The document describes an implementation of catenable double-ended queues using recursive slowdown. It presents two implementations: a simple one using a recursive data type Cat to represent the queues, and an improved one that embeds the queues within a compound element Ele to achieve logarithmic time concatenation. The improved implementation handles concatenating and tailing operations on the compound queues in various cases.
The document describes an update to the binary random-access list data structure presented in section 9.2.1. The update allows updating elements in the list by passing a function, rather than a new value, to avoid re-traversing the list on each update. This improves the time complexity of the update operation from O(log^2 n) to O(log n).
The document describes different types of data structures including stacks, queues, deques, and output-restricted deques. It provides functions for adding and removing elements from both ends of these structures, such as cons to add to the front, snoc to add to the back, and tail to remove from the back. Specifically for output-restricted deques, snoc adds an element to the back by checking length constraints, and cons adds to the front by incrementing the front length.
This document describes the bottom-up mergesort algorithm with sharing. It shows an example of sorting the numbers 5, 2, 7, 4, 1, 8, 3 step-by-step. It then analyzes the amortized cost of adding new numbers and of the entire sorting process, showing both take O(log n) time and O(n) time respectively.