Skip to main content

All Questions

-1 votes
1 answer
79 views

Print stack or row in different ways with same function in Python

My task is to print Stack and Queues in different ways. I implemented Stack with single linked list and Queue with double linked list. This is main function where I push elements into Stog(Stack) and ...
None4's user avatar
  • 13
0 votes
2 answers
657 views

Changing a singly linked list to a doubly linked list

I created a singly linked list function and my professor said for extra credit we can change it into a doubly linked list. I read a few things such as adding a prev_node function such as this. class ...
Cooper's user avatar
  • 123
7 votes
1 answer
6k views

Is a Python list a singly or doubly linked list?

I'm wondering what the order of complexity for a Python v2.7 list being built up using append() is? Is a Python list doubly linked and thus it is constant complexity or is it singly linked and thus ...
WilliamKF's user avatar
  • 43.2k