Welcome to CISC220 Data Structures in C++ sakai.udel.edu Office Hours: Mon / Wed 2:30PM - 4PM TAs: Miao Tang,

Slides:



Advertisements
Similar presentations
CISC Data Structures Ben Perry University of Delaware Summer 2011.
Advertisements

 Pointers, Arrays, Destructors Is this random stuff or are these somehow connected?
Chapter 9 Pointers and Dynamic Arrays. Overview 9.1 Pointers 9.2 Dynamic Arrays.
Pointer Variables The normal variables hold values. For example, int j; j = 2; Then a reference to j in an expression will be identified with the value.
Data Structures (Second Part) Lecture 2 : Pointers Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
Course Introduction Bryce Boe 2013/06/25 CS24, Summer 2013 C.
Analysis of programs with pointers. Simple example What are the dependences in this program? Problem: just looking at variable names will not give you.
COMP171 Data Structures and Algorithms Spring 2009.
CMPT 225 Data Structures and Programming. Course information Lecturer: Jan Manuch (Jano), TASC TAs: Osama Saleh,
COMP171 Data Structures and Algorithms Spring 2009.
CIS 101: Computer Programming and Problem Solving Lecture 9 Usman Roshan Department of Computer Science NJIT.
Data Structures & Algorithms What The Course Is About s Data structures is concerned with the representation and manipulation of data. s All programs.
Review for Test 2 i206 Fall 2010 John Chuang. 2 Topics  Operating System and Memory Hierarchy  Algorithm analysis and Big-O Notation  Data structures.
Administrivia- Introduction CSE 373 Data Structures.
COMP171 Data Structures and Algorithm Huamin Qu Lecture 1 (Sept. 1, 2005)
COMP171 Data Structures and Algorithm Qiang Yang Lecture 1 ( Fall 2006)
CENG 213 Data Structures Department of Computer Engineering Middle East Technical University Fall 2014 CENG 213 Data Structures 1.
Data Structures and Programming.  John Edgar2.
METU Computer Engineering Department
Data Structures and Programming.  Today:  Administrivia  Introduction to 225, Stacks  Course website: 
1 CS 233 Data Structures and Algorithms 황승원 Fall 2010 CSE, POSTECH.
Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 1.
Data Structures (Second Part) Lecture 1 Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
BIT 142:Programming & Data Structures in C#. A2 due date  A2 is due this Friday, June 12 th, by 11:30am BIT 142: Intermediate Programming2.
General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 2/10/2010.
School of Engineering and Computer Science, Victoria University of Wellington COMP 103 Linked Structures.
CS 206 Introduction to Computer Science II 09 / 10 / 2009 Instructor: Michael Eckmann.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Introduction.
Course Introduction Bryce Boe 2013/09/30 CS24, Fall 2013.
Department of Computer Science 1 Last Class on Chapter 6 1. HW 1 and HW 2 2. Greatest Common Devisor 3. Sudoku App 4. Chapter 6 Summary 5. Chapter 6 Questions.
Pointers in C++. 7a-2 Pointers "pointer" is a basic type like int or double value of a pointer variable contains the location, or address in memory, of.
Today: Office hours –No tomorrow. M/T- 3-on. Overloading operators Inheritance Review.
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
Tracing through E01, question 9 – step 1 // p02.cc P. Conrad, for CISC181 07S // Exam question for E01 #include using namespace std; void mysteryFunction(int.
ICS202 Data Structures King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Introduction.
Topic 3: C Basics CSE 30: Computer Organization and Systems Programming Winter 2011 Prof. Ryan Kastner Dept. of Computer Science and Engineering University.
1 Homework HW4 due today HW5 is on-line Starting K&R Chapter 5 –Skipping sections for now –Not covering section 5.12.
Chapter 16 – Data Structures and Recursion. Data Structures u Built-in –Array –struct u User developed –linked list –stack –queue –tree Lesson 16.1.
Programming Abstractions Cynthia Lee CS106X. Topics:  Priority Queue › Linked List implementation › Heap data structure implementation  TODAY’S TOPICS.
Welcome to CISC220H Data Structures in C++ sakai.udel.edu Office Hours: Mon/Wed 3:30PM - 4:30PM TA: Adnan Ozsoy.
C Programming Lecture 16 Pointers. Pointers b A pointer is simply a variable that, like other variables, provides a name for a location (address) in memory.
Memory Management in Java Computer Science 3 Gerb Objective: Understand references to composite types in Java.
CISC105 – General Computer Science Class 8 – 06/28/2006.
CISC220 Fall 2009 James Atlas Dec 07: Final Exam Review.
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.
Pointer Lecture 2 Course Name: High Level Programming Language Year : 2010.
 Saturday, April 20, 8:30-11:00am in B9201  Similar in style to written midterm exam  May include (a little) coding on paper  About 1.5 times as long.
Welcome to CISC220 Data Structures in C++ sakai.udel.edu Office Hours: Tues 3PM - 4PM / Thurs 1PM - 2PM TA: David.
Announcements There is a Quiz today. There were problems with grading assignment 2, but they should be worked out today The web page for correcting the.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To introduce the basic concepts of linked lists ❏ To introduce the basic concepts.
Principles of Imperative Computation Lecture 1 January 15 th, 2012.
Data Structures By Dr. Mehedi Masud ِAssociate Professor, Computer Science Dept. College of Computers and Information Systems Taif University 1.
CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 10/11/2006 Lecture 7 – Introduction to C.
Sections Basic Data Structures. 1.5 Data Structures The way you view and structure the data that your programs manipulate greatly influences your.
CENG 213 Data Structures Nihan Kesim Çiçekli
Introduction to Computing
© 2016 Pearson Education, Ltd. All rights reserved.
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone:
Programming Abstractions
Computer Science 102 Data Structures CSCI-UA
Announcements Homework #7 due Monday at 3:00pm
Arrays and Linked Lists
Introduction CSE 373 Data Structures.
Pointers & Objects.
Strings and Pointer Arrays
Administrivia- Introduction
COMPUTER 2430 Object Oriented Programming and Data Structures I
Administrivia- Introduction
Presentation transcript:

Welcome to CISC220 Data Structures in C++ sakai.udel.edu Office Hours: Mon / Wed 2:30PM - 4PM TAs: Miao Tang, Zequn (Richard) Huang

Who am I?

Who are you?

What will we learn? Pointers Lists Analysis/ Big O notation Stacks Queues Recursion Trees Sorting Heaps Graphs NP-completeness Hashing

How will we learn? Class exercises + Lab participation (5%) Homework problems/programming (10*3- 5% = 35%) Two programming projects (20%) Three tests (two midterm * 10%, final 20%)

What is a Data Structure?

Objectives for Today Manipulate pointers –read/write –create –dereference –assign value Reading - K+W P.1-P.6

Review of pointers & memory cf. K&W, Chapter P A C++ Primer section P.5

Smith Hall Newark, DE USA

How could we move the Department of Computer and Information Sciences?

Memory Address vs. Value Stored Consider memory to be a single huge array: –Each cell of the array has an address associated with it. –Each cell also stores some value. Don’t confuse the address referring to a memory location with the value stored in that location

Pointers An address refers to a particular memory location. In other words, it points to a memory location. Pointer: A variable that contains the address of a variable. z x y Location (address) name 104

Pointers How to initialize a pointer: – can initialize to NULL (i.e. not currently pointing to anything) – & operator: get address of a variable int *x; x?y? int y = 3; x?y3 x = &y; xy3

Pointers How to get the value that is pointed to? – * “ dereference operator”: get value pointed to * x returns 3 How to change the variable pointed to? – Use dereference * operator to left of = xy5 *x = 5 ; xy3