[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

are data structures nothing more than glorified labels for a

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 11
Thread images: 1

File: 1436978902532.jpg (10KB, 250x237px) Image search: [Google]
1436978902532.jpg
10KB, 250x237px
are data structures nothing more than glorified labels for a basic object/class/struct that has generic list methods and some leafs or node childs?
>>
EVERYTHING'S A GLORIFIED LABEL FOR BINARY SLUDGE AND GOTO STATEMENTS
>>
>>55922453
Data structures are anything that hold data. Don't overcomplicate it.
>>
>>55922492
Is a Blu ray disc a data structure?
>>
>>55922772
It contains multiple data structures.
It has a low-level encoding (usually where the ECC happens) to get data onto the disc.
Then it has a filesystem, which is a data structure.
The filesystem holds the video and audio, which are data structures.
>>
>>55922453
No. You use structs to implement these types of data structures. But all the different types of trees, lists, arrays, hash tables, heaps, etc. are not bullshit and you really do need to learn them.

I became a data structure believer when I got the runtime of my program down from hours to seconds by using the right data structure (a binary min-heap instead of a sorted array.)
>>
>>55923012
can you give me a list of the essential data structures?

I don't want to spend hours upon hours of MIT lectures.
>>
>>55923041
hashmap
stack
queue

Those are the TOP TIER datastructures.

The rest of the datastructures are just for storing data in self expanding storage, like vectors or linked list. They mostly differ in time complexity for access, insertion, and deletion but not really functionality; The essential structures to utilize to their full extent in your daily programming are the ones I listed.
>>
>>55923041
Thanks for inspiring me to write a pasta. Please give me feedback on how I can improve it for future use.

ESSENTIAL DATA STRUCTURES
You don't need to know how to implement these off the top of your head, but you should know what they are and know which one is right for the job.

It's worth studying how the Linux Kernel's built-in data structures are implemented, because it's done really well. They implement a few structs and macros that allow you to turn any struct you want into a linked list node, tree node, or whatever. Kernel contributors are then prohibited from rolling their own data structure implementations unless absolutely necessary.

Types of trees:
* binary
* b-tree
* self-balancing (various types)
* degenerate (i.e. linked lists)
* radix
* arrays used as trees (especially binary trees)
* search tree vs. non-search tree
* memory pool

Types of arrays (i.e. contiguous memory lists:)
* regular arrays
* bit arrays (best way to do arrays of Booleans)
* stored size variable vs. delimiter, pros & cons
* circular buffer (i.e. using a start and end index and the modulus trick)

Types of lists:
* arrays
* linked lists
* double-linked lists
* circular linked lists
* circular double-linked lists
* hybrid array/linked list approaches
* skip lists
* trees used as sorted lists
* queues (see: heaps)

Other:
* hash tables
* heaps (best way to implement a priority queue. You should also learn the term "heapify")
* graphs (superset of trees)
* sets (usually implemented similar to a hash table, or possibly as a bit array in certain situations)
* Stacks (i.e. FIFOs)
* non-priority queue (i.e. LIFOs)
* Caches (along with different cache eviction strategies)
>>
>>55923184
>stack
>queue

linked lists
>>
>>55923041
"hours upon hours" isn't really that much time if you're planning to make a career or long-term hobby out of this.
Thread posts: 11
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.