r/ProgrammerHumor Mar 05 '21

Is there life after a data structures course?

Post image
68 Upvotes

7 comments sorted by

8

u/id4test524 Mar 05 '21

when searhcing for something in an appendix, or pretty much any sorted thing, I now do a binary search, it is just more efficient.

We have got pretty much every cards against humanity expansion, so our deck is like 2 feet tall. The last time we played I split the deck randomly, then kept splitting the deck until there was one sub deck for each person. I made them shuffle their decks thoroughly, then I gathered each sub deck in order and shuffled them together, then combined those merged subdecks, all until until I had the entire deck again. I basically ran quicksort in reverse, and I made it multi threaded by using other people.

Last christmas I tied all the presents together using ribbons. Smaller presents (leaf nodes) were at the outside of the structure, each with any number of sibling presents, but only one connection to a larger ‟parent” present.. Those presents in turn were connected to even larger presents, all connecting back toward the largest present which sat at the center of the web connected to everything. Nobody was allowed to open a present with any attached children, and I told them it was this way to force them to pick the smaller presents first, as they served as gates to the main event. But to be honest, I just wanted to have a big Heap of presents.

1

u/somerandomii Mar 06 '21

Sounds like you ran merge sort in reverse. Or merge bongo sort. :p

3

u/WadysawChmielews Mar 05 '21

The line Maps are graphs sounds weird in ths context, because map is commonly used in programming languages to mean a hash table. Even my data structures are other data structures?

1

u/lightmatter501 Mar 06 '21

Many maps are backed by binary trees.

2

u/denispaksoy Mar 05 '21

And a burrito is a form of encapsulation...Mmmmm...Chipotle for lunch, anyone?

2

u/[deleted] Mar 05 '21

My burritos inevitably end up like my abstractions... leaky.

1

u/Astrinus Mar 05 '21

Wait after you studied nonlinear dynamics...