ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it...

13
ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: http://people.math.yorku.c a/~zyang/itec2620m.htm Office: Tel 3049

Transcript of ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it...

Page 1: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

ITEC 2620MIntroduction to Data Structures

Instructor: Prof. Z. YangCourse Website: http://people.math.yorku.ca/~zyang/itec2620m.htmOffice: Tel 3049

Page 2: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

2

Course Objective

• Course is about concepts– what you can program, not how

• Traditionally, second course in computer science – still separates top third of programmers – not taught in any known college diploma

program

• Learn and use efficient programming patterns – “an efficient programmer can often produce

programs that run five times faster than an inefficient programmer”

Page 3: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

3

Textbooks

•“A Practical Introduction to Data Structures and Algorithm Analysis – Java Edition” by Clifford A. Shaffer

•Lecture notes and announcements will be made available at:

http://people.math.yorku.ca/~zyang/itec2620m.htm

Page 4: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

4

Marking Scheme

• Assignment 1: 10%• Midterm: 30%

– about 1/3 code, 2/3 concepts • Final: 60%

– about 1/3 code, 2/3 concepts

• Late Policy– The assignment is optional. Late assignments

will NOT be accepted. If you miss it, the weight will be added to the weight of the TWO PROGRAMMING QUESTIONS in the final exam. No medical note is required. A make-up midterm will NOT be provided. If you miss the midterm, the weight will be added to the weight of the final exam.

Page 5: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

5

Schedule

LectureTopic1a Introduction1b Searching 2a Sorting – non-recursive algorithms2b Estimation and Complexity analysis – non-recursive algorithms3a More complexity analysis, Complexity estimation – non-recursive algorithms3b Linked lists4a Doubly linked lists and Binary trees4b Recursion and Binary tree operations

Page 6: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

6

Schedule (Cont’d)

Lecture Topic 5a Sorting – recursive algorithms5b Link list and BST operations6a Complexity estimation – recursive algorithms6b Midterm review7a MIDTERM7b Estimation of recursive algorithm, abstract data types and Stacks8a Stack based recursion, Queues, Priority Queues8b Midterm solution discussion

Page 7: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

7

Schedule (Cont’d)

Lecture Topic 9a Heaps and Heapsort

9b Graphs and Graph algorithm

10a Hashing 10b 2-3 trees

11a B-trees11b B+trees12a Review12b Review

Page 8: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

8

Course Organization

• Key concepts first – searching, sorting, complexity

analysis, linked structures

• Concrete to concept– searching sorting

complexity analysis – binary tree recursion

Page 9: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

Chapter 1

Introduction

Page 10: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

10

Need for Data Structure

• Computer– Store and retrieve information– Perform calculation

• Costs and benefits– A data structure requires a certain

amount of space for each data item it stores, a certain amount of time to perform a single basic operation, and a certain amount of programming effort.

Page 11: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

11

Problem, Algorithms and Programs

• Problem: a task to be performed

• Algorithm: a method or a process followed to solve a problem

• Program: an instance, or concrete representation, of an algorithm in some programming language.

Page 12: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

12

Algorithm Efficiency

• Design goals:– Design an algorithm that is easy

to understand, code, and debug.– Design an algorithm that makes

efficient use of the computer’s resources.

• Algorithm analysis

Page 13: ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: zyang/it ec2620m.htm Office: Tel 3049.

13

Three keys to programming

• Algorithm Design– Sequence, branching, looping – flowcharts

and pseudocode– Efficiency and time-space tradeoffs (linkages

between algorithms and data structures)

• Data Organization– objects and classes– data structures

• Modularization– methods (modularization of algorithms)– classes and inheritance (modularization of

data/objects)