EECS 233 Programming Assignment #1
100 points
Due Thursday, Sept. 26, 2013 (23:59:59 EST)
For this and other programming assignments, it is helpful if you write out (as in hand-written) a
design and test sheet that works through the logic of the implement
EECS 233 Programming Assignment #1
100 points
Due February 13, 2014 (23:59:59 EST)
In last HW, you specified a generic PhoneBook class, presumably using either an array or a linked list to store the
information. In this assignment, you will provide an abs
EXAM 2
Lecture 14: Hashing
Vocab
- Key: unique attribute of object
- Index: position of object in array
- Unsorted arrays: indexes independent of keys; searching is dumb and inefficient
- Sorted arrays: indexes related to keys; searching is smart and effi
EECS 233: Introduction to
Algorithms & Data Structures
Fall 2014
Course Information
Instructor
Dr. Michael Lewicki
Associate Professor
Electrical Engineering and Computer Science Dept.
Case Western Reserve University
email:
ofce:
ofce hours:
michael.lewic
EECS 233 / Summer 2006 Homework 1c Design Document Benjamin Horstman The assignment was to implement an integer data array of size exactly 9. I used eclipse & java compiler compliance level 5.0. I implemented a class, ac.java, which has an integer ar
EECS 233 Programming Assignment #1
100 points
Due February 14, 2013 (23:59:59 EST)
In last HW, you specified a generic PhoneBook class, presumably using either an array or a linked list to store the
information. In this assignment, you will provide an abs
EECS 233 Written Assignment #2
Akshaya Annavajhala
Due Feb 21, 2008 (midnight, 23:59:59) 1. (a) Let Node p refer to an element in a list. Write a helper method that swaps p and the subsequent element by
swapping only the links (and not the data). pu
EECS 233 Written Assignment #4
Due April, 25 (23:59:59 EST)
The following problems are from either textbook. 1. What is the running time of quicksort for:
(a) Sorted input (2 points) Depends on pivot choice. Best case Pivot: O(n log n) (b) Reverse-o
EECS 233 Introduction to Algorithms and Data Structures
Fall 2014, Written Assignment 1 (W1)
Due: Thursday September 11 in class (or by 1:15 pm if submitted electronically)
Total Points: 70 + 12 extra credit
Submit your assignments by the due date above.
EECS 233 Written Assignment #3 AKSHAYA ANNAVAJHALA
1. Chapter 6, Exercise 6.2 (3points) 1 3 2 6 7 5 4 15 14 12 9 10 11 13 8
2.
3.
Consider two efficient algorithms for the selection problem we discussed as an application of heaps (see lecture 13 s
EECS 233: Introduction to
Algorithms & Data Structures
Fall 2014
Course Information
Instructor
Dr. Michael Lewicki
Associate Professor
Electrical Engineering and Computer Science Dept.
Case Western Reserve University
email:
ofce:
ofce hours:
michael.lewic
EECS 233 Written Assignment #4
Due April, 30 1:15pm
Please submit electronically (scanning hand-written work if needed) to blackboard.
NO SUNSET PERIOD: ASSIGNMENTS NOT ACCEPED ONCE SOLUTIONS ARE
POSTED
1. What is the running time of quicksort, with the m
EECS 233 Written Assignment #3
1. Let c1 and n1 be the constants in the big-O definition for f1(n) = O(g1(n) , and c2 and n2 be these
constants for f2(n) = O(g2(n). The constants cm = max(c1, c2) and nm= max(n1, n2) will satisfy the
big-O definition for f
EECS 233 Written Assignment #4
1.
What is the running time of quicksort for:
(a) Sorted input (2 points)
(b) Reverse-ordered input (2 points)
Solution:
For both (a) and (b), it is O(N log N) because the pivot will always partition perfectly, and each part
EECS 233 Written Assignment #2
Solutions
1.
void reverseList()cfw_
Node currentPos, nextPos, previousPos;
previousPos = null;
currentPos = head;
nextPos = currentPos.next;
while( nextPos != null)cfw_ / The list from the start to previousPos has been rever
EECS 233 Written Assignment #4
!
!
!
1.
!
2.
!
3.
!
!
!
Due Tuesday, Dec 3 at 1:15 pm
15 points + 5 extra credit
What is the running time of quicksort (with the middle element of the input array used as the pivot)
for:
(a) Sorted input (2 points)
(b) Reve
Chapter 2
Probability
2.1 Introduction
Probability refers to the study of
randomness and uncertainty.
In this chapter, some fundamental
terminologies and rules of probability
will be introduced.
2.2 Probability and Inference
Probability theory is the foun
Exercise 4 Solution
Chapter 4 Economic Efficiency, Government Price Setting, and Taxes
4.1 Consumer Surplus and Producer Surplus
1) The difference between the highest price a consumer is willing to pay for a good
and the price the consumer actually pays i
EECS 233
1. Stacks (Ch 3)
2. Queues (Ch 3)
3. Return Exams
4.
Stacks
Textbook: The fact that most modern machines have stack
operations as part of the instruction set enforces the idea that the
stack is probably the most fundamental data structure in
comp
EECS 233
1. Graphing in Java
2. Time Complexity (Ch 2)
3. Homework # 1 recap
Announcements
HW #1 due Wednesday at 11:00 PM.
HW help session Wednesday (tomorrow)
o Hoping for Rockefeller 301 at 6:00 PM
o Ends when everyone is gone
Quiz #1 on Thursday at
Balancing:
Read characters until end of expression.
If the character is an opening symbol, push it onto the stack.
If it is a closing symbol, then if the stack is empty report an error. Otherwise, pop the stack.
If the symbol popped is not the correspondi
Funcnn Name
c Canatant
iDEN Lga'imic
1031 N Lag-aquartd
N Linear
N laugh?
N1 Quadratic
N3 Cubic
2 Expantntial
Figure 1.] Typical grumh rates Algorithm Time
Input 1 2 3 r
SEE 0003 owl 00010300 003
N = 1,000 000303? 0000311 0000000 0000033
N = 10,000 00-07
EECS 233
Introduction to
Algorithms & Data Structures
1. Orientation: Who, what, where, when, how.
2. Whats in Chapter 1?
3. Homework # 1 introduction
4.
The EECS 233 Franchise
Me
T A
Y o
u
Me
Me
TA
Y o
u
Who: Chris Fietkiewicz
What: Providing resources t
EECS 233
1. Time Complexity (Ch 2 wrap up)
2. Lists (Ch 3)
3. HW #3 preview
Time Complexity (Ch 2 wrap up)
For fun:
https:/en.wikipedia.org/wiki/Time_complexity#Quasipolynomial_time
MaxSumTest.java does it all!
What about the other algorithms?
o O(N2):
Figure 6.13 A very large complete binary tree Figure 6.2 A complete binary tree
.
O 1 2 3 4 5 6 7 8 9 10 1 1 12 13
Figure 6.3 Array implementation of complete binary tree @ @
@
Figure 6.5 TWO complete trees (only the left tree is a heap) Figure 6.7 The