Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anishsinha-io/quack
implementing stacks and queues
https://github.com/anishsinha-io/quack
Last synced: 24 days ago
JSON representation
implementing stacks and queues
- Host: GitHub
- URL: https://github.com/anishsinha-io/quack
- Owner: anishsinha-io
- Created: 2022-01-05T00:51:11.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T00:56:21.000Z (about 3 years ago)
- Last Synced: 2024-11-08T12:17:47.382Z (3 months ago)
- Language: C
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stacks and Queues
This repository implements ~generic~ stacks and queues in C because the normal way is too boring for me. Push whatever
you want into to the stacks and enqueue whatever you want in the queue. You want to put a double then a pointer to a
random struct and then a string into a stack? Go for it. Also, this repo uses opaque data types so no one can ~~~~~
easily mess with the internals of the implementation but this is C so if you can do pointer arithmetic, go ham I guess.
The queue implementation has random access but because of this I had to sacrifice making it a priority queue, so it's
just a vanilla queue with random access, so you can do stuff like`get_index(queue1, );`
and it'll be done in `O(1)` time.
Dope, see you on the next one.
-A