Skip to content

copsahl/Quack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quack: A new way to structure data

What is Quack?

Quack provides us with a cutting edge, top of the line, way to deal with data! How does it do that you might ask? Well, lets just take a look at it's name real quick...

Quack = Queue + Stack

You heard that right! This data structure behaves exactly like a queue and a stack! The only caviat... the programmer has no control over the behavior of the quack!

The quack has 3 different behaviors chosen at pseudo-random! Let's look at each one of those!

Queue: A familiar structure

One of the random behaviors the quack invokes is to act like a queue! In this case, when you pop something off the quack, it will grab the first item in the quack! FIFO for dayzzzzzz.

And to help the programmer know that the quack acted as a Queue, it will print out the word "Quack!", just so you know!

Stack: An assembly programmers best friend

The second behavior the quack has is to act like a stack! In this case we just grab the item that was most recently put in the quack! FILO boyyyyy!

Again, to aid the programmer in their endevors, I have programmed the quack to print out "quack!" to identify that a stack operation had just been done!

Gray Duck: Minnesota's finest

The third and final behavior for our Quack is to become a gray duck! What does this do? Well, it doesn't pop anything off the quack at all! And in fact, it returns a pseudo-randomly generated number for your use! Isn't that nice! I have decided to create a new acronym for this case... AINO (All In None Out)!

And again, just so you know that you have been Gray Ducked, the quack will print out "qUAcK?" to inform you that you are a victim of misfortune.

FAQ

Why should I use a quack?

You shouldn't.

Why did you make the quack?

I was bored.

Will you be making more data structures in the future?

I don't know, I'm kind of lazy.

How good are you at programming?

Good enough to create a frankenstein data structure that is utterly useless.

Will there be possible updates or different itterations of the quack that would be semi useful?

Maybe.

Should Tom teach the quack in his Data Structures class?

Of course.

Why don't you comment your code?

Because even I don't know what it is doing.

About

A new, innovative, way to handle data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors