| 40 | ### NODE AND STACK IMPLEMENTATION ### |
| 41 | from copy import deepcopy |
| 42 | class Node(object): |
| 43 | def __init__(self, data=None, nextNode=None): |
| 44 | self.data = data |
| 45 | self.nextNode = nextNode |
| 46 | |
| 47 | def __str__(self): |
| 48 | return str(self.data) |
| 49 | |
| 50 | |
| 51 | class Stack(object): |