aboutsummaryrefslogtreecommitdiff
path: root/DSAA/chap3_lists_stacks_queues/list.h
diff options
context:
space:
mode:
authorSteve Lee <me@xiangyangli.com>2017-04-19 22:43:18 +0800
committerSteve Lee <me@xiangyangli.com>2017-04-19 22:43:18 +0800
commit9ee91c759c5a87030cebb6b79adc94230f23da4a (patch)
tree4184793354ac57cdbf7002e6821c301bc24ad44a /DSAA/chap3_lists_stacks_queues/list.h
parentce07c94e0ec62a829e0d0c447ec4c932f0f78c3d (diff)
downloadPersonal-9ee91c759c5a87030cebb6b79adc94230f23da4a.tar.xz
Personal-9ee91c759c5a87030cebb6b79adc94230f23da4a.zip
remove
Diffstat (limited to 'DSAA/chap3_lists_stacks_queues/list.h')
-rw-r--r--DSAA/chap3_lists_stacks_queues/list.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/DSAA/chap3_lists_stacks_queues/list.h b/DSAA/chap3_lists_stacks_queues/list.h
new file mode 100644
index 0000000..04ad7df
--- /dev/null
+++ b/DSAA/chap3_lists_stacks_queues/list.h
@@ -0,0 +1,33 @@
+#ifndef _LIST_H
+#define _LIST_H
+
+struct Node;
+typedef int ElementType;
+typedef struct Node *PtrToNode;
+typedef PtrToNode List;
+typedef PtrToNode Position;
+
+List MakeEmpty( List L );
+int IsEmpty( List L );
+int IsLast( Position P, List L );
+Position Find( ElementType X, List L );
+void Delete( ElementType X, List L );
+Position FindPrevious( ElementType X, List L );
+Position Insert( ElementType X, List L, Position P );
+void DeleteList( List L );
+Position Header( List L );
+Position First( List L );
+Position Advance( Position P );
+ElementType Retrieve( Position P );
+void PrintList( List L );
+void ConstructList( List L, int Elements[], int Num );
+
+#endif /* _LIST_H */
+
+
+/* Place in the implementation file ? */
+struct Node
+{
+ ElementType Element;
+ Position Next;
+};