Skip to content

implementing a algorithm to order two stacks (implemented with linked lists) main focus is temporal complexity of the operations

Notifications You must be signed in to change notification settings

SebastiaoJeronimo/push_swap

Repository files navigation

push_swap

implementing a algorithm to order two stacks (implemented with linked lists) main focus is the temporal complexity of the operations

Table of Contents

stack operations

operation swap (swaps the fist two elements of the stack)

image

implementation of the swap operation
Temporal complexity O(1)

image

opertaion push (takes the first element of a stack and puts it on the top of the other)

image

implementation of the push operation
Temporal complexity O(1)

image

operation rotate (the first element becomes the last one)

image

implementation of the rotate opertion
Temporal complexity O(n)

image

operation reverse rotate (the last element becomes the first one)

image

implementation of the reverse rotate opertion
Temporal complexity O(n)

image

Algorithm

To solve the problem i implemented the radix sort algorithm

radix_sort

...

Example 2

...

Contributing

...

License

...

About

implementing a algorithm to order two stacks (implemented with linked lists) main focus is temporal complexity of the operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •