Filter By
Filter Reset
Semester
Class Notes (1,029,404)
US (404,027)
Brandeis (904)

Class Notes at Brandeis University

COSI 12b Lecture Notes - Lecture 15: Binary Search Tree, Merge Sort, Linear Probing
Premium

Sorting and Binary Trees Sorting 2 Selection Sort (O(n )) Uses: Job Interviews. Mostly useless. Bogo Sort (O(n!)) Uses: Infinite number of computers. Mostly useless. Bubble Sort (...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 14: Priority Queue, Complexity Class
Premium

Stacks Queues and Runtime Efficiency Stacks and Queues Stacks are a list and subclass of vector. Stacks use LIFO (last in is the first out). Queues use FIFO (first in is the first out). Queues can add, remove, and peek...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 13: Associative Array, Iterator
Premium

Maps Maps A set is like a map from elements to booleans. A map associates a key with a value. Keys are unique, unlike values. The put method adds a mapping. Maps are also known as hash, dictionary, and associative arr...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 12: Binary Search Tree, Hash Table, Iterator
Premium

Abstract Data Types (ADT) An Abstract Data Type is a general specification of a data type. An Abstract Data Type specifies the type of data that can be stored and the operations that can be performed on that data. By u...

Computer Science
COSI 12b
Pito Salas
ECON 10a Lecture Notes - Lecture 1: Macroeconomics, Microeconomics, Economic Equilibrium

Discuss microeconomics and explain the forces of demand and supply. Describe macroeconomics and the issues for the entire economy. Identify how to evaluate economic performance. Discuss managing the economys performance. D...

Economics
ECON 10a
Kristin J. Lieb
COSI 12b Lecture Notes - Lecture 11: Time Complexity
Premium

Lists ArrayList Limitations Shifting elements, via adding or removing, can significantly slow the program. However, since ArrayLists internally store data in an array it is very good at reading a specific element at a ...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture 10: ArrayList and Collections
Premium

ArrayList and Collections ArrayList Syntax for an enhanced for loop Syntax: for (<type> <name>: <collection>) {} The list cannot be modified inside an enhanced for loop; it would result in a ConcurrentModificationExc...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 9: Java Collections Framework, Negative Number
Premium

Java Collections Framework Java Collections Framework: ArrayList ArrayList objects can store data of any type. ArrayList is in the java.util.*; package and must be imported. ArrayList is a generic class. ArrayList Syn...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture 8: Abstract Classes
Premium

Abstract Classes Abstract Classes Classes have only concrete implementations of state and behavior. Interfaces have only abstract declarations of behavior and constant fields. Abstract classes are an in between state...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 7: Codeshare Agreement, Multiple Inheritance
Premium

Interfaces and Static Methods Interfaces An interface is a list of methods that classes can promise to implement. Inheritance gives you an is a relationship with code sharing. An interface gives you an is a relation...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 6: Downcasting
Premium

Polymorphism To add a variable to a subclasss constructor it should always be after the call to the superclasss constructor, never before. Private fields in a parent class can only be accessed in a subclass via accesso...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture 5: Inheritance
Premium

Inheritance Coupling Coupling (class dependency on other classes) should be limited. Inheritance Is a Relationship: Ex. Secretary is an Employee. Superclassbase classparent class is extended. Subclassderived class child cl...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 4: Class Invariant
Premium

Pre/Postconditions and Invariants A class invariant is an assertion about the objects state that will always be true. Invariants mainly concern the classs constructor(s) and mutator methods. If the user violates the inv...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture 3: Variable Shadowing
Premium

Object Initialization Constructor Syntax: public <class name>(parameters) {} Java only provides a default when there is no constructor. Constructors, like methods, can be overloaded. Constructors cannot have void wri...

Computer Science
COSI 12b
Pito Salas
COSI 12b Lecture Notes - Lecture 2: Null Pointer
Premium

Instance Methods null null can be stored in a variable. Methods can return null. Using the methods of an object is called dereference. Null cannot be dereferenced; it will cause a Null pointer exception. Instance Meth...

Computer Science
COSI 12b
Pito Salas

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit