1 / 10

Data Structures

Data Structures. Fall 2013. What is a Data Structure?. A data structure is a method of organizing data. The study of data structures is particularly important when using an object-oriented programming language. Simple Data Types.

jeb
Télécharger la présentation

Data Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Structures Fall 2013

  2. What is a Data Structure? • A data structure is a method of organizing data. • The study of data structures is particularly important when using an object-oriented programming language.

  3. Simple Data Types • Many programming languages provide built-in simple data types. For example: • Characters • Integers • Real Numbers • Boolean (TRUE, FALSE) • Strings (words)

  4. Arrays • A one-dimensional array can be thought of as a list or a vector. It is a homogeneous collection of data. • For example, an array of 10 integers might take 20 bytes of storage. If the name of the array is IntArray, the 10 integers might be accessed as IntArray[0], IntArray[1], ... , IntArray[9].

  5. Arrays II • Most programming languages provide built-in arrays. • Most programming languages provide for multi-dimensional arrays. • A two-dimensional array, for example, allows the programmer to think of the data as being organized in a table (rows and columns). Note this is a virtual table.

  6. Records • A record is a heterogeneous data structure. • For example, a student record, or a customer record. • The individual components of a record are called fields.

  7. Abstract Data Type • An ADT is a data structure together with the operations that are allowed on the data structure. • STACK: FILO structure, top, Push, Pop • QUEUE: FIFO structure, head, tail (front, back), Enqueue, Dequeue • LIST: head, tail, current, Insert, Delete, Next

  8. Pointers • A pointer is a structure that contains not data but an address that points to data. • The Program Counter can be considered as a pointer. • Pointers allow for dynamic memory allocation. • Many data structures can be implemented either with dynamic or static memory allocation.

  9. Other Structures • Trees: Family tree, Directory, Binary Tree, Game Tree • Graphs: A general graph is a mathematical structure that consists of a set of vertices and a set of edges. The study of graph theory is very important in theoretical Computer Science.

  10. To study for the Quiz What is an Abstract Data Type? Be able to describe the following ADT’s by their actions and how they can be implemented: Stack, Queue, Binary Tree, Graph Distinction between dynamic and static.

More Related