Data Structures and Algorithms Dick Steflik Fall 2012 4/7/2015 Data Structures and Algorithms 1 Instructor Prof. Richard (“Dick”) Steflik steflik@binghamton.edu Office: T22 Engineering Building Office Hours: Tue and Thu : 11:00 – 1:00 PM http://www.cs.binghamton.edu/~steflik/cs240/cs240.htm 4/7/2015 Data Structures and Algorithms 2 Teaching Assistant TA: Huseyin Aygan Office Hours: TBA Blackboard: http://blackboard.binghamton.edu “Data Structures and Algorithms-SPG2”, section B1 4/7/2015 Data Structures and Algorithms 3 Course Information Course Web page http://www.cs.binghamton.edu/~steflik/cs240/cs240.htm No cell phones/ smart phones in class (can keep it in vibrate/silent mode) No Laptops can be used during class take notes in the old-fashioned way Slides will NOT be provided before the lecture Take notes in class 4/7/2015 Data Structures and Algorithms 4 Class email list cs240b1@cs.binghamton.edu You should have received an email from me on this list You are responsible for everything I write to this email address Revisit the list archives if necessary 4/7/2015 Data Structures and Algorithms 5 Prerequisites and Background CS 140 CS 210 or CS 211 Past programming experience in C or C++ is not required We will build fairly large programs, and move quickly for some beginning programmers 4/7/2015 Data Structures and Algorithms 6 Grading 20%: 2 Exams tentative breakup: 10% and 10% 20%: Lab Grade (lab grades and attendance) 10%: Quizzes and Attendance 50%: Programming Assignments, Projects 4/7/2015 Data Structures and Algorithms 7 Course Requirements (more detail) Labs About 10 “regular”, graded, labs Usually due within a week of the lab Submit via class FTP server (bigblackbox.cs.binghamton.edu) No makeups No drops Attendance is required 4/7/2015 Data Structures and Algorithms 8 Course Requirements (more detail) Exams (2) Closed notes, closed book, in class Exams are not cumulative 4/7/2015 Data Structures and Algorithms 9 Course Requirements (more detail) Projects (6) “Bigger” than labs, more interesting Two weeks (usually) Team work if explicitly mentioned in the description Submit via class FTP server Attendance & Participation Come to class, lab, office hours, ask questions there are NO dumb questions 4/7/2015 Data Structures and Algorithms 10 Course Materials Textbook (Required) ADTs, Data Structures, and Problem Solving with C++, Second Edition, Larry Nyhoff, Prentice Hall (2005) ISBN: 0-13-140909-3 http://cs.calvin.edu/books/c++/ds/2e/ My Powerpoint slides Available from Course Web page Necessary but not sufficient… 4/7/2015 Data Structures and Algorithms 11 Course Policies Office Hours and help Please concentrate almost all of your in-person requests of the TA’s and I to office hours “By Appointment” is always an option Feel free to email any time cs240b1@cs.binghamton.edu for content questions to the entire class steflik@binghamton.edu for other issues Assume any email to the TA will be forwarded to me 4/7/2015 Data Structures and Algorithms 12 Course Policies Late Penalties Tough but reasonable Good excuses will be honored (health, court appearance) Individual extensions rarely granted I sometimes give the whole class an extension (but don’t count on it!) Many labs and assignments will come with a late penalty and a “zero time” If we get it after “zero time” you get a zero, probably because we will post answers by then 4/7/2015 Data Structures and Algorithms 13 Course Policies (continued) “Collaboration” Work individually Get help from TA’s and me we are very responsive Be careful when talking to fellow students Learn general information, not specific solutions Never share or borrow code (this is a violation of the Academic Honesty Code) “Collaborators” will be punished equally and harshly We can tell… 4/7/2015 Data Structures and Algorithms 14 Grade Changes TA/CA will do the grading, but grade changes must come through me After 2 weeks, grades are set in stone Visit me during office hours (or send email) We will make grading mistakes, and we will happily correct them (but don’t push it) 4/7/2015 Data Structures and Algorithms 15 Some comments… Wide variety of incoming skill levels I will try to challenge everyone See me early if you have problems (Also see me if you’re not learning enough) Organization and perseverance count This class will be a lot of work for many of you Start early, plan to work hard on each assignment 4/7/2015 Data Structures and Algorithms 16 Official Course Description Analysis of the design, implementation, and properties of basic and advanced data structures, including lists, stacks, queues, hash tables, trees, heaps, and graphs. Design and time-space analysis of basic and advanced algorithms, including searching, sorting, insert/delete, hash table collision resolution techniques, recursive functions, balanced tree maintenance, and graph algorithms. Weekly required laboratory programming and three or more additional programming projects in C++. Practical programming techniques including C++ templates and the Standard Template Library (STL), operator overloading, C++ stream I/O, separate compilation using makefiles, debugging tools and techniques, dynamic memory management. Prerequisites: CS 120 or CS 210, and CS 140. 4/7/2015 Data Structuress and Algorithms 17 In a nutshell What is programming? Programming is about storing, accessing, and manipulating data Many options exist How do we organize data in programs? What language mechanisms do we employ? How do we evaluate different solutions? Choices have important performance and functionality consequences…. In this class, you’ll learn how to use the tools (language mechanisms and data structures) and how to pick the right tool (algorithm analysis) for different jobs 4/7/2015 Data Structures and Algorithms 18 Objectives: Become proficient in… Programming recursion, pointers, simple memory management and allocation, separate compilation, parameter passing, and more C++ programming language concepts classes, objects, pointers and references, enumerated types, typedefs, templates, and more Container concepts, representations, and operations lists, queues, stacks, trees, graphs, heaps, hash tables 4/7/2015 Data Structures and Algorithms 19 Objectives: Become proficient in… Abstract data type (ADT) concepts design and implementation considerations Sorting algorithms bubble sort, selection sort, merge sort, quicksort, counting sort, and more Simple performance analysis of algorithms and container operations 4/7/2015 Data Structures and Algorithms 20 Course Objectives I hope to turn you into computer programmers… Direct exposure to important tools and concepts Experience – long hours in the lab (for some of you) Failure (small “failures”… not course failure!) Large programs – more code than you’ve written before I care more what you think looking back at this class, than during or immediately following… (curse me now, thank me later?!) 4/7/2015 Data Structures and Algorithms 21 Help with C++ www.horstmann.com/ccj2/ccjapp3.html www.cplusplus.com/doc/tutorial/ Sections 1 and 2 Appendices C, D and E of Nyhoff Books listed on the class Web page 4/7/2015 Data Structures and Algorithms 22