Data Structures Class Notes #7
Chapter 4 - Trees
Binary Trees code on canvas/weiss code
Will know HW 1 scores by next week Wed.
WORK ON HW 2! Due Friday
Next Mondays lecture: expression trees in stacks
Another Data Structure type:
- First in, First
Data Structures Class Notes #4
Some of Last Class:
NOW, CHAPTER 3:
most basic data structure: arrays
more complicated data structure: array lists
another example: link lists
Abstract Data Type (ADT)- In computer science, an abstract data
Data Structures Class Notes #5
For HW 1 Programming 1, make sure to have max rectangle print length, width, and
Some of Last Class:
Accessing an element is Order 1. Removing and Adding elements is Order N.
Singly Linked List
Data Structures Class Notes #1
Only 6 HW assignments, and one will be dropped. Combination of Theory and Programming.
Piazza wont be available until next week. (Reminder: you are not anonymous in Piazza)
Two weeks to complete each homework due Friday at 4
Data Structures Class Notes #3
HW 1 DUE (NEXT) FRIDAY
You do not need a specific value of k for the written hw
For programming, you can use k = 2
Weiss textbook source code can be downloaded for free on Mark Weiss website
Dont forget about recitation
Data Structures Class Notes #13
You should only be using generics when youre making a data structure whose job it is to create
arbitrary objects and store/retrieve them.
h0(x), h1(x), h2(x), h3(x)
hi(x) = (hash(x)+f(i)%tableSize
Need to figure ou
Data Structures Class Notes #2
Only 3 recitations a week in room 486 (aka click), following into FairChild
Tuesdays 2:30-3:30 pm
READ CHAPTER 1, 2, 3
Can access Bauers class slides, a written resource in addition to Blaers lect
Data Structures Class Notes #26
WHAT TO STUDY FOR FINAL:
Ch 1: Familiar with types of proofs. In particular, induction proof like on midterm. Will be first
question on Final
- Tower of Hanoi
- How to deal with Generics in the conte
Data Structures Class Notes #15
Missed Class #14 (talked mostly about Midterm according to Hannah)
Work on HW 4!
Last Class, Priority Queues.
- Each piece of data has a priority associated with it.
- The lower number, the higher the priority
- Highest pri
Data Structures Class Notes #23
Do Disktra - builds the table, where the table are the vertices. Vertices are stored in a hashmap.
Set up the distance, the known, the pathfield/previousVertex. When do dikstra is do
Data Structures Class Notes #18
Missed Class #16 and #17 (talked mostly about different sorting algorithms)
Work on HW 5!
- Last class proofs about Merge Sort and the costs
- Quicksort Algorithm, average case is NlogN
- Going through code of Quicksort
Data Structures Class Notes #10
Remove method for binary trees:
Remember: When you remove, you need to either pick the largest node of the left side or the
smallest node on the right side when the root has two children
In code, the first if and else if fi
Data Structures Class Notes #25
HW 6: If you have a set of n numbers you wish to permute, you want to look at the first number
of the resulting permutations. You want to fix that first number. Rely on Design rule in
recurrence relation. Base case is when
Up to Chapter 6 Big Java now.
Continuing with Arrays:
Arrays are one type of collection of data.
Methods dont have the system.print outs in them because their function is to calculate
something and immediately output it.
Array References- you c
Assume W (memory width) is 8 bits
Types of Operations that can be performed on the memory:
1) FETCH-takes in the address (memory location) of the value you want
a) are not destructive
b) value = fetch(address)
c) load address into
Name and Uni must be on top of HW 3 and others in general unless a program hw.
HW 4 due on Monday
Readings from Chapter 6. Wrapping up Chapter 6.
Start reading Chapter 8 and skip Chapter 7 for now.
Arrays are actually references to the location
CU WICS (Women in Computer Science)
Thursday in CS Lounge WICS Meet and Greet
HW 2 up until tonight
Recitations this week posted on CourseWorks (same times and same places as last recitation)
Big Java up to Chapter 4 now. Chapter 5: Methods and
COMS W1004 TAs (16 TAs total and on CourseWorks as well)
Han-Je > Head TA Flexible
Kathy Mondays from 1-3 pm
Mitchell Tuesdays 10-12 pm
Sam Tuesdays 6-8 pm
Iris Monday 6-8
Will Tuesdays 12-2 pm
Val Thursday 9:30-11:3
Chapters 1-6, 8 in Big Java
Chapters 1-3, in Invitation book
Midterm Review class this Wednesday
For this Wednesday, Make a list of what you think will be on the Monday midterm
TA Midterm review sessions, you should have questions prepped for
The Order of an Algorithm
Linear Algorithms: The # of inputs = # of operations/work, is called on the order of n. O(n)
Big O means upper bound on an algorithm (algorithms that go faster then big O of N could
technically be called order of n as
Shift away from CUNIX. Start using Eclipse. Should have read Chapters 1 and 2 of Big Java.
Now, Chapter 3.
x = y will evaluate to a boolean expression (true/false)
= means comparing
= means assigning
x != means to check if not equal
HW 2: Due Wednesday.
- Me: Possibly change date from day of month of to mm/dd/yyyy
The continue ends the current iteration of the loop when it is hit and spins back from the
beginning. Continues need to be inside cond
For Homework, partial credit is possible when you show work. Re-write to avoid ambiguity.
Homework 2: Java Coding
You should be reading Big Java Late Objects 1, 2, and starting 3 this week. We will be working
sequentially with Big Java Late Obj
Missed Lecture 10, will get notes from Hannah or Luisana.
HW 4 due tonight at 11:55 pm
HW 5 due next Wednesday
HW 6 due after Midterm
Last class, introduced object-oriented programming.
instance variables: properties/fields of an object
/ Bank program
/ written by Kristina Saha
/ prints the balance of the bank account for the first
/ three months with a given initial balance and interest rate
public class Bank cfw_
public static void main(String args
/ Kristina Saha
/ UNI ks3401
/ Zipcode class
/ This is a template for your Zipcode class
/ You may add methods and instance variables to this
/ class but your code must work with the provided test class ZipTest.java
/zipcode to barcode
/ Easter program
/ written by Kristina Saha
/ prints the date and month Easter falls on during specific year
public class Easter cfw_
public static void main(String args) cfw_
/ TODO Auto-generated method stub
Running Head: SOCIOLOGY
The Changing Status of the Teaching Profession
Teaching is the practice of imparting knowledge or transmitting skills to an
individual or a group of people. The person, who transmits the knowledge or skills, is kno