New answers tagged

1

You need to understand the problem the data structure is trying to solve, how it is used (algorithms around it). You need to be able to see any alternatives and their advantages and disadvantages, specially when managing lots of data. You need some guide, concrete problems to solve, somebody who tells you the relevant mathematics (yes, understanding why one ...


0

Some data structure texts I've seen use "bag" as a generalization of stack/queue/deque: can add items (repetitions allowed), can extract items (no order assumed, i.e. LIFO, FIFO; same sequence of insertions/extractions could give a different output sequence), ask if it is full. No "check if element is present", though. Perhaps what you are looking for is a ...


3

Carrano, Data Abstraction & Problem Solving with C++: Walls and Mirrors begins by introducing a simple ADT kind of like you're talking about, called a "Bag". But it is not used as a base class for later examples (e.g., trees, et. al.). From Sec. 1.5:


Top 50 recent answers are included