implementing a algorithm to order two stacks (implemented with linked lists) main focus is the temporal complexity of the operations
operation swap (swaps the fist two elements of the stack)
implementation of the swap operation
Temporal complexity O(1)
opertaion push (takes the first element of a stack and puts it on the top of the other)
implementation of the push operation
Temporal complexity O(1)
operation rotate (the first element becomes the last one)
implementation of the rotate opertion
Temporal complexity O(n)
operation reverse rotate (the last element becomes the first one)
implementation of the reverse rotate opertion
Temporal complexity O(n)
To solve the problem i implemented the radix sort algorithm
...
...
...
...