Created
October 28, 2015 21:27
-
-
Save lbrito1/a1d0a1e60c126792d598 to your computer and use it in GitHub Desktop.
Output for the script_linked_list.py test.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lbrito@lbrito:~/Documents/code/cstuff$ python pywrap/script_linked_list.py | |
Creating list | |
List empty. | |
Adding 3 and 5 | |
Printing list. Size = 2 | |
head = 3 (0x635850) tail = 5 (0x6fb4c0) | |
---------------------------------- | |
List[idx] Value Address | |
---------------------------------- | |
List [0]: 3 0x635850 | |
List [1]: 5 0x6fb4c0 | |
---------------------------------- | |
Adding 10, 20 and 30 | |
Printing list. Size = 5 | |
head = 3 (0x635850) tail = 30 (0x6fb5a0) | |
---------------------------------- | |
List[idx] Value Address | |
---------------------------------- | |
List [0]: 3 0x635850 | |
List [1]: 5 0x6fb4c0 | |
List [2]: 10 0x6fb520 | |
List [3]: 20 0x6fb560 | |
List [4]: 30 0x6fb5a0 | |
---------------------------------- | |
Deleting 5 | |
Printing list. Size = 4 | |
head = 3 (0x635850) tail = 30 (0x6fb5a0) | |
---------------------------------- | |
List[idx] Value Address | |
---------------------------------- | |
List [0]: 3 0x635850 | |
List [1]: 10 0x6fb520 | |
List [2]: 20 0x6fb560 | |
List [3]: 30 0x6fb5a0 | |
---------------------------------- | |
Deleting 3 (list head) | |
Printing list. Size = 3 | |
head = 10 (0x6fb520) tail = 30 (0x6fb5a0) | |
---------------------------------- | |
List[idx] Value Address | |
---------------------------------- | |
List [0]: 10 0x6fb520 | |
List [1]: 20 0x6fb560 | |
List [2]: 30 0x6fb5a0 | |
---------------------------------- | |
Deleting 30 (list tail) | |
Printing list. Size = 2 | |
head = 10 (0x6fb520) tail = 20 (0x6fb560) | |
---------------------------------- | |
List[idx] Value Address | |
---------------------------------- | |
List [0]: 10 0x6fb520 | |
List [1]: 20 0x6fb560 | |
---------------------------------- | |
Deleting the remaining elements (list should be empty) | |
List empty. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment