l01-intro-complexity

l01-intro-complexity - CS112 Data Structures Intro to...

Info icon This preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 1 Lecture 1 CS112: Data Structures CS112: Data Structures Intro to Course Asymptotic complexity and big-O Linked Lists
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 2 Lecture 1 CS112: Data Structures CS112: Data Structures Instructor: Prof. Louis Steinberg office: Hill 401 email: [email protected] Office hours: To be Announced TA: Binh Pham Office: Core 336 Email: [email protected] Office hours: 4-5pm Mondays
Image of page 2
CS112: Slides for Prof. Steinberg ʼ s lecture 3 Lecture 1 Class Web Site Class Web Site http://sakai.rutgers.edu http://sakai.rutgers.edu Log in using Rutgers NetID & password, click on “CS112, Summer 2011” tab You are assumed to know anything posted.
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 4 Lecture 1 Prerequisite Prerequisite CS 111 or equivalent Comfortable writing and debugging programs 1 to 2 pages long Basic Java (types, control flow, etc.) Arrays (1D) Sequential search Insertion sort Recursion Using objects (not defining classes) Big-O worst case analysis
Image of page 4
CS112: Slides for Prof. Steinberg ʼ s lecture 5 Lecture 1 Prerequisite Prerequisite Determination to work hard and keep up- to-date on coursework
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 6 Lecture 1 Requirements Requirements Problem sets - not to turn in Homework Projects Written exams Midterms and Final
Image of page 6
CS112: Slides for Prof. Steinberg ʼ s lecture 7 Lecture 1 Textbook Textbook Data Structures Outside In with Java, 1st Edition. by Sesh Venugopal Prentice-Hall, 2006. ISBN 978-0131986190.
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 8 Lecture 1 What is a data structure What is a data structure A representation scheme that stores Multiple pieces of data Relationships between pieces of data E.g, Object Array Linked List
Image of page 8
CS112: Slides for Prof. Steinberg ʼ s lecture 9 Lecture 1 What to know about a DS What to know about a DS What operations can we do? What do they cost? Time Memory space
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 10 Lecture 1 How long does it take How long does it take Problem: actual time depends on What computer What language What compiler What programmer What input We want a measure of time that does not depend on these
Image of page 10
CS112: Slides for Prof. Steinberg ʼ s lecture 11 Lecture 1 Solutions Solutions Count operations, not time Op count = f(input size) Among inputs of the same size, use worst or average op count Abstract away details of f: O(f) focus on large inputs Ignore constant multiples
Image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 12 Lecture 1 Example Example Input: double array A, int n, double target Output: boolean: are any of first n elements of A equal to target for (i = 0; i<n; i++){ if (A(i) == target){ break;}} return i < n;
Image of page 12
CS112: Slides for Prof. Steinberg ʼ s lecture 13 Lecture 1 Count Operations, Not Time Count Operations, Not Time So processor speed doesn’t matter But which operation to count?
Image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.
  • Summer '09
  • VENUGOPAL
  • Analysis of algorithms, Computational complexity theory, Best, worst and average case, Prof. Steinbergʼs lecture

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern