diff options
Diffstat (limited to 'src/01/01a/README.md')
| -rw-r--r-- | src/01/01a/README.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/01/01a/README.md b/src/01/01a/README.md index e69de29..5cd106a 100644 --- a/src/01/01a/README.md +++ b/src/01/01a/README.md @@ -0,0 +1,10 @@ +# Assignment 1 - Question 1a - Computer Science 272: Data Structures and Algorithms + +* Describe the meaning of the essential methods `add(x)`, `deleteMin()`, and `size()` that are supported by the priority queue interface. +* Implement those methods using a singly-linked list. +* Analyze the running time of the `add(x)` and `deletMin()` operations based on this implementation. + * The `add(x)` method is used to add an element to the queue with a priority. + * The `deleteMin()` method is used to remove the element with the lowest priority from the queue and return it. + * The `size()` method is used to determine how many items are in the queue. + * The `add(x)` function is linear time O(n). + * The `deleteMin(x)` function is constant time O(1). |
