1 / 14

Data Structures

Data Structures. Introduction. What is data?. (Latin) Plural of datum = something given. Data and Operations. "Data" and "Operations" are to Computer Science as "Point" and "Line" are to Geometry. Undefined terms, the starting point. Computers, Algorithms, Programs.

Mia_John
Download Presentation

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 Introduction

  2. What is data? • (Latin) Plural of datum = something given.

  3. Data and Operations • "Data" and "Operations" are to Computer Science as "Point" and "Line" are to Geometry. • Undefined terms, the starting point.

  4. Computers, Algorithms, Programs • Computers are machines that perform operations on data • Algorithms are sequences of operations to be performed on particular types of data in order to achieve a meaningful outcome. • Programs are algorithms that are coded in a particular syntax or language such as Assembly, C++, Java, or Python

  5. Data vs. information • Data becomes information when it is structured in some way that has meaning.

  6. Ways of structuring data • Bit strings (0's and 1's) • Integers • Floating point numbers • Logical values (True, False) • Characters • Strings • Lists, Queues, Dequeus, Trees • Files, pictures …

  7. Operations • Each data structure has its own set of operations. • Integers: • Add, multiply, divide, compare… • Strings of characters • Concatenate, print, compare, substrings…

  8. In Data Structures, we study • Ways of structuring data Abstract Data Types (ADT's) e.g. Lists, Stacks, Queues, Trees, Graphs • Operations on those data types Algorithms to manipulate ADT's e.g. Searching, Sorting, Recursion

  9. User Interface Implementation Operations ADT's encapsulate. Data & Algorithms.

  10. List 10 random 2-digit integers >>>from random import randint >>>[randint(10,100) for i in range(10)] [87, 35, 52, 88, 87, 60, 19, 19, 26, 72] Examples of encapsulation: randint(a,b): An algorithm not in Python range(n): Implemention is built in to Python List: An abstract data type

  11. Use of Abstract Data Types • Separates the problem of implementation from that of manipulation • Allows the programmer to solve problems without regard to implementation. • Allows the programmer to alter the implementation without affecting problems already solved.

  12. Understanding Data Structures • Helps you write better programs • Makes you a better problem solver • Helps you use computers more efficiently • Helps you maintain programs more effectively

  13. Why Python? • Fact: (Alan Turing) Any computer (with a minimal set of operations) can, with enough time and memory, perform any task any other computer can do. • Any programming language (with a minimal set of operations) can implement any algorithm that any other programming language can implement.

  14. Python • Has an impressive set of built-in data structures. • New data structures can be implemented relatively easily. • Interpreted language. You can try anything before compiling.

More Related