1. data structure: refers to a collection of data elements with one or more specific relationships.
2. Data type: it is a set of values and a set of operations defined on this set of values.
Second, the characteristics are different.
1. data structure: data structures are often related to efficient retrieval algorithms and indexing techniques.
2. Data type: Data structures are also used for data types. For example, the underlying structure of HashMap is array+linked list+red and black tree.
Third, the roles are different.
1. data structure: A well-chosen data structure can bring higher operation or storage efficiency.
2. Data type: used to define variables, and variables are used to store data.