  # 1. Why do we need data structures? Provide an example of each.2. Discuss a mathematical model and implementation of a List data structure?3. What are the differences between a list and a linked list?

Question

1. Why do we need data structures? Provide an example of each.
2. Discuss a mathematical model and implementation of a List data structure?
3. What are the differences between a list and a linked list?

check_circleExpert Solution
Step 1
1.

Data structure:

• Data structure is defined as a collection of data values, operations that are performed on the data, and the relationships among the data values.
• To represent basic values in programming language, primitive data structures are used.
• To store multiple values in a single variable, non-primitive data structures are used.

Example for data structures:

• Integer, char, Boolean and pointers are the examples of primitive data structures.
• Examples of non-primitive data structures include array, stack, list, tree, and so on.
Step 2

2.

Mathematical model:

• Mathematical model defines a container, which contains countable number of objects where the objects are connected through a binary relationship.
• An example of mathematical model of data structure is an Abstract Data Type (ADT).
• In mathematical model, the basic operations which can be performed on the containers include insertion, deletion, and so on.
• A list data structure is a...

### Want to see the full answer?

See Solution

#### Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour*

See Solution
*Response times may vary by subject and question
Tagged in

### Data Structures 