1.8 Review questions
This final section contains some review questions about the contents of this chapter.
An ADT is:
- A collection of values is a data type, not an ADT.
- It can’t be a data structure, since an ADT is more like the interface for a data structure.
- An implementation for a data structure in a program is close, but not really it. An ADT is more abstract than an actual program.
An ADT is a form of:
- What does the “A” stand for in ADT?
Which is an example of a composite type?
- A composite type is made up of two or more simple types.
- Character, Integer, and floating point numbers are all simple types.
A composite type is:
- A type with only 1 simple type is just a simple type. There is a better answer to this question.
- An ADT is the realisation of a data type, including the type and the operations allowed on the type.
- An object is an instance of a class.
A data structure is:
- A data structure is not an ADT.
- A data structure is not a type (which is also a collection of values).
An ADT is most like which of the following?
- A data structure, program, class, or method are all concrete implementation.
- An object is something created at runtime.
A primitive type is:
- A class may have more than one, or only simple types as members.
- The model of a type is another way to define an ADT.
- Any type is a collection of values and therefore, a subset of another type.
A type is:
- A type is a general concept, so it is not an integer, or an implementation, or a variable.
- A type has values. An ADT is a collection of actions on an object (a type).
A tool for measuring the efficiency of an algorithm or problem is:
- A profiler works on a program, not an algorithm.
- The system clock works on a program, not an algorithm.
- Empirical analysis works on a program, not an algorithm.
- Algorithm analysis estimates the cost of an algorithm or problem.
Which is NOT a topic that a this course book focuses on?
- A key topic for any DSA course is the basic toolkit of data structures and algorithms.
- A key concept for any DSA course is the concept of tradeoffs for costs versus benefits.
- A key skill for any DSA course is ability to measure the effectiveness of a data structure or algorithm.
- Designing and maintaining large programs is a focus for Software Engineering.
As computers have become more powerful:
- Good solutions for large, complex computational problems usually require different approaches than what we do in everyday life.
- As problems that we try to solve grow more complicated, their solutions tend to grow more complicated.
- Processor speed cannot grow as fast as the cost of a slower algorithm applied to a bigger problem.
- As our computers have become more powerful, our history has been to apply them to more complex problems.
Which of these is more a concern for Software Engineering than for a data structures course?
- Designing efficient programs is a focus for data structures and algorithms courses.
- Designing and maintaining large programs is a focus for Software Engineering.
Which of these is NOT one of the three standard steps to follow when selecting a data structure to solve a problem?
- Knowing the basic operations required to solve your problem is the first step to selecting a suitable data structure.
- Knowing the resource constraints for your problem’s basic operations is the second step to selecting a suitable data structure.
- Once you know the basic operations and their resource constraints, then you can select a data structure that matches.
- Many problems do not require that you run simulations to determine the expected times for alternative solutions.