コード例 #1
0
ll_stack.push(30)
ll_stack.push(100)
ll_stack.push(25)
ll_stack.pop()
print(ll_stack.peek())'''

#build a queue using a linked list
#front queue at head
#back of queue at tail
'''ll_queue = LinkedList()
#enqueue
ll_queue.append(40)
ll_queue.append(49)
ll_queue.append(50)
#ll_queue.print_list()
#front
#print(ll_queue.head.data)
#dequeue
ll_queue.delete_from_head()
print(ll_queue.head.data)'''

ll_queue = LinkedListQueue()

ll_queue.enqueue(6)
ll_queue.enqueue(20)
ll_queue.enqueue(16)
ll_queue.enqueue(5)

ll_queue.dequeue()

print(ll_queue.front())