Commit 4439443

mo khan <mo.khan@gmail.com>
2020-06-29 19:07:00
Add README for 1a.
1 parent 7510ecb
Changed files (2)
src/01/01a/priority_queue.h
@@ -11,7 +11,6 @@ typedef struct {
   int size;
 } PriorityQueue;
 
-
 PriorityQueue *initialize();
 Node *create_node(int priority, int data);
 int size(PriorityQueue *queue);
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).