Lecture 1: CSE 373. Data Structures and Algorithms

Similar documents
Lecture 1: Welcome! CSE 373: Data Structures and Algorithms CSE WI - KASEY CHAMPION 1

Testing and Debugging

Binary Heaps. Autumn Shrirang (Shri) Mare CSE 373: Data Structures and Algorithms

CSE 373: Data Structures and Algorithms. Binary Search Trees. Autumn Shrirang (Shri) Mare

CSE 373: Data Structures and Algorithms. Asymptotic Analysis. Autumn Shrirang (Shri) Mare

CSE 373: Data Structures and Algorithms. Hash Tables. Autumn Shrirang (Shri) Mare

Floyd s buildheap, Sorting

CSE 373: Introduction, ADTs, Design Decisions, Generics. Michael Lee Wednesday Jan 3, 2017

Hash Tables: Handling Collisions

CSE 373: Data Structures and Algorithms. Final Review. Autumn Shrirang (Shri) Mare

CSE 373: Data Structures and Algorithms. Memory and Locality. Autumn Shrirang (Shri) Mare

Lecture 2: Implementing ADTs

CSE 373: Data Structures and Algorithms. Disjoint Sets. Autumn Shrirang (Shri) Mare

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium

CSE 332: Data Abstractions. Ruth Anderson Spring 2014 Lecture 1

Minimum Spanning Tree

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims

CSE 143 Lecture 14. Interfaces; Abstract Data Types (ADTs) reading: 9.5, 11.1; 16.4

Lecture 3: Queues, Testing, and Working with Code

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus

CS 106B, Lecture 1 Introduction to C++

CSE 143. Lecture 13: Interfaces, Comparable reading: , 16.4, 10.2

Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018

CS503 Advanced Programming I CS305 Computer Algorithms I

CSE 332: Data Structures. Spring 2016 Richard Anderson Lecture 1

CS 240 Fall Mike Lam, Professor. Just-for-fun survey:

CISC 3130 Data Structures Fall 2018

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

Implementing Hash and AVL

EECE.2160: ECE Application Programming Spring 2017

Lecture 3: Maps and Iterators

Introduction to Data Structures

Credit: The lecture slides are created based on previous lecture slides by Dan Zingaro.

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

Intensive Introduction to Computer Science. Course Overview Programming in Scratch

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University

CMSC 341. Shawn Lupoli (substituting for Nilanjan Banerjee) UMBC CMSC 341 Intro 1

CSCI 4250/6250 Fall 2013 Computer and Network Security. Instructor: Prof. Roberto Perdisci

COLLEGE OF DUPAGE CIS 2542 Advanced C++ with Data Structure Applications Course Syllabus

CS 241 Data Organization. August 21, 2018

CSE 326 Team. Today s Outline. Course Information. Instructor: Steve Seitz. Winter Lecture 1. Introductions. Web page:

CS 200, Section 1, Programming I, Fall 2017 College of Arts & Sciences Syllabus

CSE 373 OCTOBER 11 TH TRAVERSALS AND AVL

San José State University Computer Science Department CS49J, Section 3, Programming in Java, Fall 2015

Announcements. 1. Forms to return today after class:


CS 3270 Mobile Development for Android Syllabus

EECE.2160: ECE Application Programming Spring 2019

Operating Systems CMPSC 473. Introduction January 15, Lecture 1 Instructor: Trent Jaeger

CS2013 Course Syllabus Spring 2018 Lecture: Mon/Wed 2:00 P.M. 2:50 P.M. SH C259 Lab: Mon/Wed 2:50 P.M. 4:00 P.M. SH C259

CSC116: Introduction to Computing - Java

CSE 344 JANUARY 3 RD - INTRODUCTION

CSE 240 Introduction to Computer Architecture

CSE 544 Principles of Database Management Systems

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1,2 and 3, Spring 2017

CSE 143, Winter 2009 Final Exam Thursday, March 19, 2009

Welcome to CompSci 201

CPSC 2380 Data Structures and Algorithms

CS 241 Data Organization using C

Data Structures and Algorithms

CSC116: Introduction to Computing - Java

Introduction to Programming System Design CSCI 455x (4 Units)

Adam Blank Lecture 1 Winter 2017 CSE 332. Data Abstractions

Cleveland State University

San Jose State University College of Science Department of Computer Science CS151, Object-Oriented Design, Sections 1, 2, and 3, Spring 2018

CSC 261/461 Database Systems. Fall 2017 MW 12:30 pm 1:45 pm CSB 601

COMP Analysis of Algorithms & Data Structures

Priority Queues and Heaps

Topic 1: Introduction

More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6

CSE 417 Practical Algorithms. (a.k.a. Algorithms & Computational Complexity)

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Advanced Client-Side Web Programming CSCI 491/595 Syllabus Fall 2018

TA hours and labs start today. First lab is out and due next Wednesday, 1/31. Getting started lab is also out

Welcome to... CS113: Introduction to C

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

Object-Oriented Programming CSCI-UA

Building Java Programs. Interfaces and Comparable reading: , 10.2, 16.4

CSE 143 Sample Final Exam #3

Check out FilesAndExceptions from SVN. Exam 2 Review File I/O, Exceptions Vector Graphics Project

CS61BL. Lecture 1: Welcome to CS61BL! Intro to Java and OOP Testing Error-handling

CS 111: Programming Fundamentals II

Testing and Debugging

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

San José State University Department of Computer Science CS151, Section 04 Object Oriented Design Spring 2018

CSC116: Introduction to Computing - Java

CSE 142. Lecture 1 Course Introduction; Basic Java. Portions Copyright 2008 by Pearson Education

Cleveland State University

Data Structures and Algorithms

CS 210 Algorithms and Data Structures College of Information Technology and Engineering Weisberg Division of Engineering and Computer Science

17 February Given an algorithm, compute its running time in terms of O, Ω, and Θ (if any). Usually the big-oh running time is enough.

Survey #2. Assignment #3. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings. Static Interface Types.

CSC 1052 Algorithms & Data Structures II: Introduction

Homework Assignment 2: Java Console and Graphics

COMP 401 COURSE OVERVIEW

COSC 115: Introduction to Web Authoring Fall 2013

Tips from the experts: How to waste a lot of time on this assignment

CSE373: Data Structures and Algorithms Lecture 1: Introduction; ADTs; Stacks/Queues. Lauren Milne Summer 2015

CS 3030 Scripting Languages Syllabus

Algorithms and Data Structures Spring 2008

Transcription:

Lecture 1: CSE 373 Data Structures and Algorithms Thanks to Kasey Champion, Ben Jones, Adam Blank, Michael Lee, Evan McCarty, Whitaker Brand, Stuart Reges, Zora Fung, Justin Hsia, and many others for sample slides and materials... 1

Agenda -Introductions -Administrative stuff -Class overview -Review some 143 concepts -Meet the ADT 2

Waitlist -No Overloads -Many students move around, likely a spot will open -Email cse373@cs.washington.edu for all registration requests/questions 3

Hello! Shrirang (Shri) Mare Postdoc in CSE, Security & Privacy Before UW: PhD at Dartmouth, Software Developer at IBM shri@cs.washington.edu CSE 360 Office Hours: Wednesdays 3:30-6:30

Course Goals At the end of this class, you should be able to - Implement your own data structures - Figure out which data structure AND implementation is best to solve a problem - Write tests to be confident that your implementation are correct - Work collaboratively with others on code - Use with professional software engineering tools Tell me your course goals: Pre-Course Survey 5

Communication Website - Schedule, course calendar, policies, material, assignments, etc. Canvas - Grades will be posted here Google Discussion Board - Announcements made here - Ask and answer questions staff will monitor and contribute Office Hours - Spread throughout the week, by appointment Email - To staff: cse373-staff@cs.washington.edu - To individuals: Include [CSE-373] in your subject Anonymous feedback - Comments about anything related to the course where you would feel better not attaching your name 6

Grade Break Down Homework (65%) - Projects (50%) - Partners encouraged - Written Assignments (15%) - Must be individual Exams (35%) - Midterm Exam Friday Nov 2 in class (15%) - Final Exam Tuesday Dec 11 (20%) 7

Deadlines and Student Conduct Late policies - 3 late day tokens for the quarter, max 2 per submission - For pair projects, both partners will need to use their late day(s) - Need to get things done on time difficult to catch up! Academic Integrity - Name your collaborators - Credit your sources - I will trust you implicitly and will follow up if that trust is violated - In short: don t attempt to gain credit for something you didn t do and don t help others do so either - This does not mean suffer in silence can still learn from the course staff and peers 8

Class Style Please come to lecture and participate - Collaboration - Demos - Participate: - Answer questions don t worry about it being right or wrong - Ask questions! Point out mistakes! Sections - TAs = heroes - Practice problems - Sections start next week Getting help - The internets - Each other - Office hours and Sections Textbook - Optional! - Data Structures and Algorithm Analysis in Java by Mark Allen Weiss 9

Hooked on Gadgets Gadgets reduce focus and learning - Bursts of info (e.g. emails, IMs, etc.) are addictive - Heavy multitaskers have more trouble focusing and shutting out irrelevant information - http://www.npr.org/2016/04/17/474525392/attention-students-put-your-laptops-away - Seriously, you will learn more if you use paper instead!!! Non-disruptive use okay - NO audio allowed (mute phones & computers) - Stick to side and back seats - Stop/move if asked by fellow student CSE 333 SP 18 JUSTIN HSIA 10

Questions? 11

What is this class about? CSE 143 OBJECT ORIENTED PROGRAMMING -Classes and Interfaces -Methods, variables and conditionals -Loops and recursion -Linked lists and binary trees -Sorting and Searching -O(n) analysis -Generics CSE 373 DATA STRUCTURES AND ALGORITHMS -Design decisions -Design analysis -Implementations of data structures -Debugging and testing - Abstract Data Types -Code-base development 12

Data Structures and Algorithms What are they anyway? CSE 373 SP 18 - KASEY CHAMPION 13

Basic Definitions Data Structure -A way of organizing and storing related data points -Examples from CSE 14X: arrays, linked lists, stacks, queues, trees Algorithm -A series of precise instructions used to perform a task -Examples from CSE 14X: binary search, merge sort, recursive backtracking CSE 373 SP 18 - KASEY CHAMPION 14

Review: Clients vs Objects CLIENT CLASSES A class that is executable, in Java this means it contains a Main method public static void main(string[] args) OBJECT CLASSES A coded structure that contains data and behavior Start with the data you want to hold, organize the things you want to enable users to do with that data CSE 143 WI 18 WHITAKER BRAND 15

Abstract Data Types (ADT) Abstract Data types - A definition for expected operations and behavior Start with the operations you want to do then define how those operations will play out on whatever data is being stored Review: List - a collection storing an ordered sequence of elements - each element is accessible by a 0-based index - a list has a size (number of elements that have been added) - elements can be added to the front, back, or elsewhere - in Java, a list can be represented as an ArrayList object CSE 143 WI 18 STUART REGES 16

Review: Interfaces interface: A list of methods that a class promises to implement. - Interfaces give you an is-a relationship without code sharing. - A Rectangle object can be treated as a Shape but inherits no code. - Analogous to non-programming idea of roles or certifications: - "I'm certified as a CPA accountant. This assures you I know how to do taxes, audits, and consulting." - "I'm 'certified' as a Shape, because I implement the Shape interface. This assures you I know how to compute my area and perimeter." Example // Describes features common to all // shapes. public interface Shape { public double area(); public double perimeter(); } public interface name { public type name(type name,..., type name); public type name(type name,..., type name);... public type name(type name,..., type name); } CSE 143 SP 17 ZORA FUNG 17

Review: Java Collections Java provides some implementations of ADTs for you! You used: Lists List<Integer> a = new ArrayList<Integer>(); Stacks Stack<Character> c = new Stack<Character>(); Queues Queue<String> b = new LinkedList<String>(); Maps Map<String, String> d = new TreeMap<String, String>(); But some data structures you made from scratch why? Linked Lists - LinkedIntList was a collection of ListNode Binary Search Trees SearchTree was a collection of SearchTreeNodes CSE 373 SP 18 - KASEY CHAMPION 18

Full Definitions Abstract Data Type (ADT) - A definition for expected operations and behavior - A mathematical description of a collection with a set of supported operations and how they should behave when called upon - Describes what a collection does, not how it does it - Can be expressed as an interface - Examples: List, Map, Set Data Structure - A way of organizing and storing related data points - An object that implements the functionality of a specified ADT - Describes exactly how the collection will perform the required operations - Examples: LinkedIntList, ArrayIntList CSE 373 SP 18 - KASEY CHAMPION 19

List of ADTs -List -Set -Map -Stack -Queue -Priority Queue -Graph CSE 373 SP 18 - KASEY CHAMPION 20

Case Study: The List ADT list: stores an ordered sequence of information. -Each item is accessible by an index. -Lists have a variable size as items can be added and removed Supported Operations: -get(index): returns the item at the given index -set(value, index): sets the item at the given index to the given value -append(value): adds the given item to the end of the list -insert(value, index): insert the given item at the given index maintaining order -delete(index): removes the item at the given index maintaining order -size(): returns the number of elements in the list CSE 373 SP 18 - KASEY CHAMPION 21

Case Study: List Implementations - ArrayList - Linked List 22