# CS 110 Elements of Computing

Λογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 9 μήνες)

222 εμφανίσεις

CS 280

Data Structures

Professor John Peterson

Goals

Understand “Programming in the small”

Java programming

Know what’s under the hood in complex
libraries (ArrayList)

Understand performance issues

Understand algorithm design patterns

Use recursion in code and structure

Class Calendar

Wednesday: homework is due

Wednesday: 20 minute work period

Friday: project is due

Friday: 10 minute quiz

3 big tests (every 5 weeks

there
WILL be a final!)

Late Work

Homework / project is due at the start
of class on the date due. Submit via
email.

Assignments may be submitted at the
start of the class after the due date

Any later will not be accepted

Solutions to programs will be available

Syllabus DYNs

Seminars

Web page (wiki.western.edu)

Getting Help

Work together

Talk to me

USE THE WIKI! When you ask via the
wiki everyone benefits. If you email
questions to me I will answer in the wiki.

Program #1

Off to the
wiki
!

NetBeans

Let’s take a brief tour.

I won’t be lecturing much on Netbeans
but you need to spend time
understanding the various features.

Understanding Performance

We want to study how fast a program
runs. The speed is usually dependent on
one or more parameters.

For simplicity, we’ll assume that these is a
single parameter, N, that represents
some aspect of the program input.

For sorting, N = number of elements to
sort

Performance

performance

only relative
performance.

That is, if we double n, does the time it
takes to run the program double?
Triple?

Many things affect performance (like
what?)

we will ignore everything
except the “statement count”.

Big O Notation

We use a mathematical notation called
“Big O” to talk about the performance
of an algorithm.

O(n
2
) means that an algorithm runs in
time proportional to n
2

(the “size” of
the input squared).

Note that there is no constant

it’s not
23n
2

or something like that

this
compares general algorithms to each
other. Constant factors are hard to
measure and understand!