CLASS 1
Data Structures 2S2019
Recommendations
■ Git
■ Time administration
■ 0 tolerance for copies
■ Friendly Environment in class
■ Development environment
■ Follow Instructions
Data Structure
Is a way to store, organize and manage data so that it can be used efficiently. More
precisely, a data structure is a collection of data values, the relationships among them,
and the functions or operations that can be applied to the data.
Abstract Data Types
Is a type (class) for objects whose behavior is defined by a set of values and a set of
operations. The definition of ADT only mentions what operations are to be performed
but not how these operations will be implemented, this is useful because operations
can be implemented no matter what the data finally ends up being, Abstract Data Types
or ADT is a fancy name for Data Structures, usually we see Abstract Data Types as a
Black Box which hides the inner structure and design of the data type.
Operations
Operations most commonly used in ADT’s (possibly under other names).
■ Compare ■ Add
■ Hash ■ Delete
■ Print or Show ■ Search or Find
■ Create ■ Traverse
■ Initialize
■ Copy
■ Clone
■ Free or destroy
Classification
■ Primitive Data Structure (Simple data)
– Integer
– Float
– Char
– Pointer
■ Non-Primitive Data Structure (Structured data)
– Arrays
– Strings (Array of char)
– Linked Lists
– Trees
– Graphs
Classification
■ Static
This are particularly useful when time is important, particularly when traversing a data
structure, arrays are a great example of this because time to access an indexed
element is O(1) [very fast].
– Primitive Types
– Arrays
■ Dynamic
This are particularly useful when memory is a concern, since Linked Lists, Graphs or
Trees only grow as big as how many elements they contain, memory is better used
compared to an static array in which we have to define how many elements it has from
the beginning.
– Linked Lists
– Trees
– Graphs
Classification
■ Linear
Used to store data sequentially this data structures are often used in simple and small
sets of data because of how simple they are to implement.
– Linked Lists
– Stack
– Queue
■ Non-Linear
Used to store data in different manners, these data structures are more commonly used
in complex computational problems.
– Trees
– Graphs