Introduction toData structures and Algorithms

Slides:



Advertisements
Similar presentations
COEN 352 Data structures and Algorithms R. Dssouli.
Advertisements

Lecture - 1 on Data Structures. Prepared by, Jesmin Akhter, Lecturer, IIT,JU Data Type and Data Structure Data type Set of possible values for variables.
Introduction and a Review of Basic Concepts
Abstract Data Types (ADT)
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
The Design and Analysis of Algorithms
Coursenotes CS3114: Data Structures and Algorithms Clifford A. Shaffer Yang Cao Department of Computer Science Virginia Tech Copyright ©
Introduction - The Need for Data Structures Data structures organize data –This gives more efficient programs. More powerful computers encourage more complex.
1 A Introduction to Data Structures and Algorithm Analysis Data Structures Asst. Professor Kiran Soni.
Data Structures 1- Course Syllabus. 2- Introduction about Data Structures.
Data Structures Lecture-1:Introduction
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
Lecture No.01 Data Structures Dr. Sohail Aslam
Introduction to Data Structures. Definition Data structure is representation of the logical relationship existing between individual elements of data.
Unit III : Introduction To Data Structures and Analysis Of Algorithm 10/8/ Objective : 1.To understand primitive storage structures and types 2.To.
Computer Science Department Data Structures and Algorithms Lecture 1.
Dr. Engr. Sami ur Rahman Assistant Professor Department of Computer Science University of Malakand Data Structure: Introduction.
Instructor Information: Dr. Radwa El Shawi Room: Week # 1: Overview & Review.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
Prepared By Ms.R.K.Dharme Head Computer Department.
1 CS 350 Data Structures Chaminade University of Honolulu.
 DATA STRUCTURE DATA STRUCTURE  DATA STRUCTURE OPERATIONS DATA STRUCTURE OPERATIONS  BIG-O NOTATION BIG-O NOTATION  TYPES OF DATA STRUCTURE TYPES.
Chapter 1 Data Structures and Algorithms. Primary Goals Present commonly used data structures Present commonly used data structures Introduce the idea.
Data Structures and Algorithms Lecture 1 Instructor: Quratulain Date: 1 st Sep, 2009.
Data Structure Introduction.
Data Structures Lecture 1: Introduction. Course Contents Data Types   Overview, Introductory concepts   Data Types, meaning and implementation  
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Elementary Data Organization. Outline  Data, Entity and Information  Primitive data types  Non primitive data Types  Data structure  Definition 
Data Structures and Algorithms IT12112
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Elementary Data Structures Array Lists Array Lists Dale.
DATA STRUCTURES (CS212D) Overview & Review Instructor Information 2  Instructor Information:  Dr. Radwa El Shawi  Room: 
REEM ALMOTIRI Information Technology Department Majmaah University.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
1 A Practical Introduction to Data Structures and Algorithm Analysis Chaminade University of Honolulu Department of Computer Science Text by Clifford Shaffer.
Data Structure and Algorithms
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
南昌大学自动化系胡凌燕 1 Charpter 1 The data structures and algorithms (p3) There are often many approaches to solving a problem. How do we choose between them? 
Code: BCA302 Data Structures with C Prof.(Dr.) Monalisa Banerjee By.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Advanced Data Structures Lecture 1
Course Developer/Writer: A. J. Ikuomola
The Design and Analysis of Algorithms
CSCI-255 LinkedList.
COMP 53 – Week Eleven Hashtables.
Data Structure Interview Question and Answers
GC211Data Structure Lecture2 Sara Alhajjam.
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
Data Structures Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective.
Hashing Exercises.
Introduction to Data Structure
structures and their relationships." - Linus Torvalds
Data Structures (CS212D) Overview & Review.
Abstract Data Types (ADTs)
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
Objective of This Course
Introduction to Data Structures
Data Structures: Introductory lecture
Week # 1: Overview & Review
Data Structures (CS212D) Overview & Review.
Introduction to Data Structures
Introduction to Data Structure
Abstract Data Types, Elementary Data Structures and Arrays
COP3530- Data Structures Introduction
Dynamic allocation (continued)
structures and their relationships." - Linus Torvalds
Presentation transcript:

Introduction toData structures and Algorithms Lecture 1 Introduction toData structures and Algorithms

Why Study Data Structures? Data structures organize Data Good choice  better program (more efficient program) Bad choice  poor program performance Changes over time More powerful computers More complex applications More complex tasks

Why Study Data Structures? Characteristics of problem’s solution Efficiency: a solution is efficient if it solves problem within resource constraints Time Space Cost: the amount of resources a solution will consume

Why study Algorithms Algorithms solve problems Impact Good choice  more efficient program Bad choice  poor program performance Impact Different algorithms perform better on different inputs Input size can affect the performance

Abstract Data Types ADT Basic definitions Type: a set of objects Data item or element: a piece of information or record Member: a data item is said to be a member of a data type Simple data item: a data item containing no subparts Aggregate data item: a data item that may contain several pieces of information Abstract data type: a type and a collection of operations to manipulate that type ADT are mathematical abstractions, an ADT only mentions what is to be done, not how.

Data Structure A data Structure is a physical implementation of an ADT Each ADT operation is implemented by one or more subroutines Data structures are organizations for data in the main memory

Selecting a Data Structure Analyze problem Determine basic operations Select a data structure Questions At what times(s) in the program run do inserts occur Are deletes allowed? Is there any Order to data processing?

Algorithm/ Data Structure Each data structure requires: Space to store each item, including overhead Time to perform basic operations Programming effort Algorithms are closely related: Poor data structure choice higher complexity algorithms Good data structure choice  algorithm trivial

Algorithms and Programs Problem: task to be performed Algorithms: a method or process to solve a problem Algorithm transforms the input of a problem to its outputs Algorithm proprieties Must be correct It must be composed of a series of correct steps There can be no ambiguity about which step is next It must be finite in length It must terminate Program: an instance of an algorithm, written in some programming language.

Collections A collection is a structured data type that stores data and provides operations to manipulate this data (add, remove, and update) Collection types: Linear: List of elements where elements follow each other in a linear order (ordered by position first, second, …, etc ). E.g. Grocery list, array Nonlinear: List of elements which don’t have positional order E.g. Organization chart, trees and graphs Collection property such as Count: number of items in the collection

Collection operations Add: Add a new element to the collection Insert: Add a new element to the collection at a specific location Remove: Remove a specific element from the collection Clear: Remove all element from the collection Contains: Determine if a specific element is a member of a collection IndexOf: Determine the index of a specific element in a collection

Direct Access Collections Array: a collection of elements with the same data type that are directly accessed via an integer index String: a collection of characters that can be directly accessed via an index Struct (Structure or record): a composite data type that holds data that may consist of many different data types E.g.: Student record (num: int, name: string, avg: float)

Sequential Access Collections Is a list that stores its elements in a sequential order (i.e., linear list) Linear list are not limited by size Items in linear list are referenced (i.e., can only be accessed by their positions) Examples: Stacks and Queues

Stack

Queue

Hash Table

Hierarchical Collections

Group Collections A nonlinear collection of items that are UNORDERED. Examples: sets, graphs, networks

Sets

Graphs

Networks