CSCI 260 Fall 2010: Choosing ADTs

Two of the most important decisions in designing a software solution are:

Here I want to very briefly summarize some of the questions you should ask and decisions you should make when trying to select a data structure for a particular application.

(Note that after this course, when you're given a problem you'll generally be expected to pick, implement, and use an appropriate data type on your own, so the decision making process is extremely important.)

Available data types

Here is a quick rundown of the major data structures discussed so far (in CSCI 161 and 260):

Questions and implications

Here are some of the key questions you should ask before picking a data structure:

Based on the answers to those questions, you should be able to narrow down the set of appropriate data types quite quickly.

Always look for a solution that is most effective for your situation in terms of longevity, simplicity, maintainability, and efficiency.

Questions and implications

Of course, for complex problems you will often find the best solution is a combination of the simpler data types, for example:

Again, always look for a solution that is most effective for your situation in terms of longevity, simplicity, maintainability, and efficiency.