Filter By
Filter Reset
Semester
Class Notes (1,030,969)
US (404,559)
UCLA (11,742)
COM SCI (348)

Class Notes for Computer Science at University of California - Los Angeles

24HR Notes

The notes and past exams you need. Available 24 hours after each lecture.

COM SCI 32 Lecture Notes - Lecture 14: Avl Tree, Binary Tree, Binary Search Algorithm
24HR
Premium

CS 32 - Lec 14, 15 - Trees Trees Leaf Node: A node with 0 children Binary Trees struct BinaryTreeNode { string value; // node data BinaryTreeNode *pLeft, *pRight; //every node has up to 2 children n...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 16: Binary Logarithm, Heapsort, Binary Tree
24HR
Premium

CS 32 - Lec 16 - Heaps #include <unordered_map> //a hash based version of a map #include <iostream> #include <string> using namespace std::tr1; // required for a hash-based map using namespace std; int main( ) { ...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 17: Linked List, Hash Table
24HR
Premium

CS 32 - Lec 17 - Hash Tables Closed Hash Table w/ Linear Probing struct Bucket { Int idNum; Bool used; } #define NUM_BUCK 10 class HashTable { public: void insert(int idNum) { int bucket = hashFunc(idNum...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 11: Dynamic Array, Doubly Linked List, Virtual Function
24HR
Premium

CS 32 - Lec 11 - Templates & STL Object Oriented Program Design 1. Determine classes and objects a) Identify Objects: nouns in the specs b) Pick key nouns 2. How do you inter...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 8: Linear Search, Binary Search Algorithm, Time Complexity
24HR
Premium

for (i=0 ; i < n*n*n ; i++) for ( int k = 0; k < q; k++ ) sum += i; ...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 12: Merge Sort, Quicksort, Merge Algorithm
24HR
Premium

CS 32 - Lec 12, 13 - Sorting Sorting Selection Sort void selectionSort(int A[], int n) { for (int i = 0; i < n; i++) { int minIndex = i; //Locate t...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 5: Fifo (Computing And Electronics), Postfix (Software), The Queue
24HR
Premium

CS 32 - Lec 5 - Stacks & Queues Stacks: Last In First Out (Stack of Trays) - Items are always added to one end #include <stack> using namespace std; int main() { stack<int> a; //create an empty stack ...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 7: Virtual Function, Batmobile, Member Variable
24HR
Premium

CS 32 - Lec 7 - Inheritance & Polymorphism Inheritance 1. Reuse: reusing code to save time 2. Extension: Adding new behaviors(member functions) or data Car -> void accelerate BatMobile: public Car ->...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 6: Linked List
24HR
Premium

CS 32 - Lec 6 - Recursion Writing Recursive Functions 1. Write the function header What arguments your functions has and what it returns 2. Define our magic function Same aforementioned parameters bu...

Computer Science
COM SCI 32
Smallberg David
COM SCI 32 Lecture Notes - Lecture 3: Dynamic Array
24HR
Premium

CS 32 - Lec 3 - Constructors, Assignment Operators Example of a class declaration class Sequence { public: Sequence(int capacity = DEFAULT_MAX_ITEMS); // Create empty seq ... ~Sequence(); Sequence(const...

Computer Science
COM SCI 32
Smallberg David
CS32 Lecture 4: Linked Lists
24HR
Premium

CS 32 - Lec 4 - Linked Lists Singly Linked Lists struct Node { int m_data; //this is a list of ints Node* m_next; //points to a node object }; Node* head; for (Node* p = head; p != NULL; p =...

Computer Science
COM SCI 32
Smallberg David
CS32 Lecture 1: Lec 1, 2 - Pointers, Class Composition, Dynamic Memory Allocation
24HR
Premium

CS 32 - Lec 1, 2 - Pointers, Class Composition, Dynamic Memory Allocation Pointers int main() { int var = 1234; int *ptr; ptr = &var; //remember to set the value of a pointer variable ...

Computer Science
COM SCI 32
Smallberg David
Computer Science
COM SCI 111
Reiher
Computer Science
COM SCI 111
Reiher

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