r/computerscience • u/KJBuilds • May 25 '25
Discussion What exactly differentiates data structures?
I've been thinking back on the DSA fundamentals recently while designing a new system, and i realised i don't really know where the line is drawn between different data structures.
It seems to be largely theoretical, as stacks, arrays, and queues are all udually implemented as arrays anyway, but what exactly is the discriminating quality of these if they can all be implemented at the same time?
Is it just the unique combination of a structure's operational time complexity (insert, remove, retrieve, etc) that gives it its own 'category', or something more?
View all comments
Show parent comment
1
u/Vast-Ferret-6882 May 28 '25
I mean, that’s language/implementation specific. A list definitely supports stack and/or queue operations depending on the implementation. Generally, the stack ops are the efficient ones and queue ops slow, but it can be the opposite.