diff --git a/unix102/Makefile b/unix102/Makefile
index aa97189..c2a58c8 100644
--- a/unix102/Makefile
+++ b/unix102/Makefile
@@ -1,3 +1,3 @@
-FILES = index.html cheatsheet.pdf unix101.pdf vim_exercise.tar appender.sh tickets_email.sh
+FILES = index.html cheatsheet.pdf unix101.pdf vim_exercise.tar appender.sh tickets_email.sh queue.txt
RELDIR = unix102/
include ../common.mk
diff --git a/unix102/index.xml b/unix102/index.xml
index 201105b..a8424df 100644
--- a/unix102/index.xml
+++ b/unix102/index.xml
@@ -12,6 +12,9 @@
as well as some extracurricular content for you to review in your free
time.
+
+ The text file for the great editor race is available here.
+
To begin with the first exercise, you will need the following file.
To download it, execute the following command:
diff --git a/unix102/queue.txt b/unix102/queue.txt
new file mode 100644
index 0000000..5f1656c
--- /dev/null
+++ b/unix102/queue.txt
@@ -0,0 +1,100 @@
+#include
+#include
+
+struct list {
+ int head;
+ struct list *tail;
+};
+
+typedef struct list list;
+
+typedef struct {
+ list *front;
+ list *back;
+} queue;
+
+void list_free(list *lst) {
+ list *p;
+
+ while (lst != NULL) {
+ p = lst;
+ lst = lst->tail;
+ free(p);
+ }
+}
+
+list * cons(int val, list *lst) {
+ list *new = malloc(sizeof(list));
+ if (new == NULL) abort();
+
+ new->head = val;
+ new->tail = lst;
+
+ return new;
+}
+
+void list_print(list *lst) {
+ list *p = lst;
+
+ while (p != NULL) {
+ printf("%d ", p->head);
+ p = p->tail;
+ }
+}
+
+queue * make_queue() {
+ queue *new = malloc(sizeof(queue));
+ if (new == NULL) abort();
+
+ new->front = NULL;
+ new->back = NULL;
+
+ return new;
+}
+
+void push(int val, queue *q) {
+ if (q->front == NULL) { // empty queue
+ q->front = cons(val, NULL);
+ q->back = q->front;
+ }
+
+ else {
+ list *new = cons(val, NULL);
+ (q->back)->tail = new;
+ q->back = new;
+ }
+}
+
+int pop(queue *q) {
+ int val = (q->front)->head;
+ list *newhead = (q->front)->tail;
+ (q->front)->tail = NULL;
+ list_free(q->front);
+ q->front = newhead;
+
+ return val;
+}
+
+void queue_print(queue *q) {
+ printf("back ");
+ list_print(q->front);
+ printf("front\n");
+}
+
+void queue_free(queue *q) {
+ list_free(q->front);
+ free(q);
+}
+
+int main() {
+ queue *q = make_queue();
+ push(5, q);
+ push(3, q);
+ push(1, q);
+ queue_print(q);
+ printf("popped %d!\n", pop(q));
+ queue_print(q);
+ queue_free(q);
+
+ return 0;
+}