CSCI 62 Data Structures Dr. Joshua Stough September 2, 2008.

Slides:



Advertisements
Similar presentations
Intro to CIT 594
Advertisements

0 of 37 Stacks and Queues Lecture of 37 Abstract Data Types To use a method, need to know its essentials: signature and return type o additionally,
COMP 110 Introduction to Programming Tabitha Peck M.S. January 9, 2008 MWF 3-3:50 pm Philips 367.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie Summer Session II, 2005 MTWRF 9:45-11:15 am.
CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (4) Data Structures 11/18/2008 Yang Song.
COMP 14 Introduction to Programming Miguel A. Otaduy Summer Session I, 2004 MTWRF 9:45-11:15 am Sitterson Hall 014.
COMP 14 Introduction to Programming Mr. Joshua Stough January 12, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218.
Chapter 12 C Data Structures Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc.
COMP 110 Introduction to Programming Mr. Joshua Stough.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 12 – Data Structures Outline 12.1Introduction.
COMP 110 Introduction to Programming Jingdan Zhang June 20, 2007 MTWRF 9:45-11:15 am Sitterson Hall 014.
COMP 110 Introduction to Programming Mr. Joshua Stough August 22, 2007 Monday/Wednesday/Friday 3:00-4:15 Gardner Hall 307.
COMP 14 – 02: Introduction to Programming Andrew Leaver-Fay August 31, 2005 Monday/Wednesday 3-4:15 pm Peabody 217 Friday 3-3:50pm Peabody 217.
IS 320: Data Structures Spring Quarter DESCRIPTION This class is an introduction to data structures. The primary data structures—list, stack, queue,
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
Welcome to CompSci 100! As You Arrive… Make sure you grab a syllabus packet. Read through it. I will be covering the most essential points in my talk,
Chapter 12 Data Structure Associate Prof. Yuh-Shyan Chen Dept. of Computer Science and Information Engineering National Chung-Cheng University.
Digital Electronics Data Structures LISP
1 HCC Brandon Independent Study Orientation Power Point Instructor: Tiffany Cantrell.
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 5: Stacks and Queues.
CHAPTER 05 Compiled by: Dr. Mohammad Omar Alhawarat Stacks & Queues.
Welcome to CS 3260 Dennis A. Fairclough. Overview Course Canvas Web Site Course Materials Lab Assignments Homework Grading Exams Withdrawing from Class.
COMP Introduction to Programming Yi Hong May 13, 2015.
Stacks and Queues Introduction to Computing Science and Programming I.
CST 229 Introduction to Grammars Dr. Sherry Yang Room 213 (503)
Welcome to the ESL Center and ESL 403. Goals ESL 403 – Spring 2015 Improve your writing Write paragraphs Meet with tutor Practice grammar Do well in your.
Data Structure Dr. Mohamed Khafagy. Welcome to the course Data Structure Personal Web Site Course
Catie Welsh January 10, 2011 MWF 1-1:50 pm Sitterson 014.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
BIT 115: Introduction To Programming Instructor: Mike Panitz
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Introduction to Data Structures
Computer Science 102 Data Structures and Algorithms CSCI-UA.0102 Fall 2012 Lecture 1: administrative details Professor: Evan Korth New York University.
1 WELCOME TO COMPUTER SCIENCE 1027b COMPUTER SCIENCE FUNDAMENTALS II Lecturers: Eric Schost (001) John Barron (002)
Data Structures (part 2). Stacks An Everyday Example Your boss keeps bringing you important items to deal with and keeps saying: “Put that last ‘rush’
Data structures Abstract data types Java classes for Data structures and ADTs.
CSE 501N Fall ‘09 11: Data Structures: Stacks, Queues, and Maps Nick Leidenfrost October 6, 2009.
June 19, Liang-Jun Zhang MTWRF 9:45-11:15 am Sitterson Hall 011 Comp 110 Introduction to Programming.
Foundation of Computing Systems Lecture 3 Stacks and Queues.
1 1.Log in to the computer in front of you –Temp account: 231class / 2.Update your in Cascadia's system –If I need to you I'll use.
ICS202 Data Structures King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
Intro to CIT 594
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2002 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2001 Sections Ms. Susan Mitchell.
1 Data Structures COP 4530 Spring 2010 MW 4:35 PM – 5:50 PM CHE 101 Instructor:Dr. Rollins Turner Dept. of Computer Science and Engineering ENB
Winter 2016CMPE212 - Prof. McLeod1 CMPE212 Object Oriented Programming for Engineers Course Web Site: Lecture.
BIT 143: Programming – Data Structures It is assumed that you will also be present for the slideshow for the first day of class. Between that slideshow.
Course Info Instructor U.T. Nguyen Office: CSEB Office hours: Tuesday, 14:30-15:30 Thursday, 12:00-12:45 By.
Data Structures and Algorithms in Java AlaaEddin 2012.
BIT 143: Programming-Data Structures1 Before Class Begins: Sit in front of a computer Log in –IF you don’t yet have an account, you can use the guest account.
CSCI 62 Data Structures Dr. Joshua Stough October 7, 2008.
Data Structures and Algorithms Lists, Stacks, Queues, and Graphs Sorting and searching algorithms.
Computer Science I ISMAIL ABUMUHFOUZ | CS 180. CS 180 Description BRIEF SUMMARY: This course covers a study of the algorithmic approach and the object.
Networking CS 3470, Section 1 Sarah Diesburg
Chapter 12 – Data Structures
CSc 020: Programming Concepts and Methodology II
Introduction to Programming
Week 15 – Monday CS221.
Computer Science 102 Data Structures CSCI-UA
September 27 – Course introductions; Adts; Stacks and Queues
Welcome to CS 1010! Algorithmic Problem Solving.
Welcome to CS 1010! Algorithmic Problem Solving.
Welcome to CS 1010! Algorithmic Problem Solving.
Welcome to CS 1301! Principles of Programming I.
Cs212: Data Structures Computer Science Department Lecture 7: Queues.
Homework Reading Machine Projects Labs
Welcome to Intro to C/C++ CISC 192
CS Computer Science II: Data Structures and Abstraction Fall 2009
Review and Instructions
Presentation transcript:

CSCI 62 Data Structures Dr. Joshua Stough September 2, 2008

About CSCI 62 Abstract Data Types Inheritance, interfaces – adv programming Algorithms – efficiency (space, time) Move to C++ Is CSCI 62 right for you? Requirements / prerequisites –CSCI 51, or substantial AP course

Course Web Pages Sakai system login: – ~jstough/teaching/CS62F08/CS62F08.html~jstough/teaching/CS62F08/CS62F08.html Course Documents Assignments Checking Grades

How to get access Not a CMC student: see Bruce Frost at Bauer 21 (that is this building) and get your computer account set up. The process takes about five minutes or so. You MUST have an account set up to be able to hand in your homework assignments electronically. After-hour access into Adams for non-CMC students - Need to activate your card for the card reader - do the following: fill out the list being circulated. When the paper work is done, you will be asked to go to Story House (building immediately south of Collins Dining Hall) to get your card activated.

Lecture Format Review previous material –questions Present new material In-class exercises Lecture notes will be posted, but may be modified shortly after lecture.

Office Hours and Tutors M 4PM, W 3PM-on, F 3PM. All 2 nd Adams. Anytime I am in Collins. Please come to office hours.

Software Java SDK. Eclipse –on public lab machines uide/Labs/default.phphttp:// uide/Labs/default.php you can install on your machine After-hours access – Patrice Tonnis, and request card

Grades Assignments40% –both programs and book Midterms 20% Final 30% Attendance and Participation10% _____________________ Total100%

Assignments Please submit electronic copies by 11:59PM on the due date. –turn in using Sakai dropbox Homework assignments –practice for exams Programming assignments –budget hours per program design, code, debugging –start early!

Submitting Assignments All assignments will be submitted through Sakai drop box. Submission Errors –I will you and give a deadline for re-submitting –not checking your is not an excuse for missing the deadline

Late Policy Late Assignments lose 10, 15, 25, 25, 25% for each additional day late (no credit on the fifth day). This scale may be delayed given the severity of your circumstances and my being informed of them in a timely manner. I will defer to the Counseling Center (see If you have an athletic event and will not be able to make a deadline, you should tell me within a day of an assignment being posted.

Approaching an assignment Before you open eclipse and start coding (and asking for help): –read the assignment –think about what the assignment is asking for –review lectures and examples on the topic –write (yes, on paper) your plan for completing the assignment (i.e., your algorithm) talk to/ me if you’re having trouble at this point

Backup Your Work! Backup your work! You will lose something at some point –you might have to learn the hard way Use your U: drive

Collaborating You should –Struggle with the material before seeking help. –Come to office hours, me. –Make sure you understand the solutions you receive help on, whether from fellow students or me.

Sending to me Put CSCI 62 in subject line For example: –CSCI 62, I’m lost –CSCI 62, This course is too easy

Eclipse and Java –Eclipse IDE for Java Developers (85 MB) –Or download from the course schedule.

Abstract Data Types Data structures are for the efficient storage, retrieval and manipulation of data.

Linked Lists Three classes (typically) working together –an “item” class one atomic unit of the aggregate data e.g., a “Name” class (item) might have two instance variables String first, last; –a “node” class one “item” and a reference to the next “node” the next reference is the “link” in “linked list” –a “list” class reference to the first “node”—head of the list

Linked Lists data Item nextNode Node List head Node

Linked Lists New List head Node List head Node

Linked Lists Find List head Node

Linked Lists Insert Node List head Node

Linked Lists Delete List head Node

Stacks Like a stack of paper (or cafeteria trays) –“last-in first-out” (LIFO) can only add to the top - push can only remove from the top - pop Why? –Often used to keep track of execution in a program when returning from a method call, the computer has to remember where it last was

Stack top Node Only have access to the top of the stack May be implemented as a linked list

Queues Standing in line –“first-in first-out” (FIFO) add to the “tail” of the list (back of line) - enqueue remove from the “head” (head of line) - dequeue Why? –often used to keep things in the order that they arrived –processes to be scheduled on the CPU –packets arriving to a router

Queue head Node Only have access to the head and tail of the queue May be implemented as a linked list tail

Trees Nodes can have more than one link Links are bi-directional –forward link points to children –backward link points to parent Why? –keeping items in sorted order easy to add things in sorted order –fast search –also often used to parse arithmetic expressions (order of operations)

Binary Trees Every node has a parent, except head Every node has at most two children root - has no parent leaf - has no children root leaves

Binary Trees And Expressions (3 + 2) * 5 * Called a parse tree * 5 + * Evaluate deepest expressions first.

Binary Search Tree The first item added is the root Items less than the root go on the left branch Items greater than the root go on the right branch Makes searches very efficient possible order added:

Move to C++ // In C++ #include using namespace std; int main () { cout << "Welcome to C++"; return 0; } // In Java public class Hello { public static void main(String[]args) { System.out.println("Welcome to Java"); }