From c4625a1bc45b6bbc8f6d31dcdfb4cdb0f40dcb78 Mon Sep 17 00:00:00 2001 From: Donald Calloway Date: Thu, 9 Oct 2025 10:46:21 -0700 Subject: [PATCH] Added sample program with imported doubly_linked_list module --- test_dbl_linked_list.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test_dbl_linked_list.py diff --git a/test_dbl_linked_list.py b/test_dbl_linked_list.py new file mode 100644 index 0000000..e512179 --- /dev/null +++ b/test_dbl_linked_list.py @@ -0,0 +1,15 @@ +import doubly_linked_class # Module + + +dll = doubly_linked_class.DoublyLinkedList() # Instantiate a doubly_linked list + +dll.append((6, 8, 9, 0)) # Add the tuple as the first element +dll.prepend([6,7,8,9]) # Add list at the front of the list +dll.append({'Height': 68}) # Add dictionary at the end of the list +dll.insert_at_position(1, {8, 3, 5, 5}) # Add set of unique elements at index 1 +dll.print_list() # Print the doubly_linked list + +print(dll.search([6, 7, 8, 9])) # Return True if the data is an element of the linked list + + +