CS Notes 5

CS Notes 5 - 4:17 PM FIFO- First In First Out Enters from...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Big O 1. Define basic operation 1. Count number of times basic ops are done o Function in input size (n) 1. Simplify to big o by o Taking highest degree term (in n) o Dropping multiplicative constant Ex- push() Basic ops o Creation of a new node- assumed to be constant time o Pointer assingment- constant time (only happens once) O(1) Queue Monday, January 31, 2011
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4:17 PM FIFO- First In First Out Enters from the rear (enqueue), exits from the front (dequeue) Implementation Use a Circular Linked List! ArrayList Monday, January 31, 2011 4:34 PM Import java.util.ArrayList; Auto-expanding array Compromise between Arrays and linked lists Using with Queues- Don't do it...
View Full Document

Page1 / 2

CS Notes 5 - 4:17 PM FIFO- First In First Out Enters from...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online