Study Guides (238,527)
Canada (115,195)
CPSC 1045 (1)

Final Exam Review.docx

4 Pages
Unlock Document

Langara College
Computer Science
CPSC 1045

Final Exam Review 1. know binary search algorithm 2. know BigO notation (#n times an algorithm is being executed) - for loops - sorting 3. set up a Binary search tree {12, 8, 5, 25, 9...} left side holds the smallest value 12 8 25 5 9 4. Algorithm to insert a node into a Binary Search Tree: 1. Check if the value is greater or less than 2. Check if you can go to the left/right 3. If not, set up the node 4. If you can, insert the node and value insert(node n, value v) { if(v < n.value) { if(n.left == null) n.left = v; else insert(n.left, v); ... } if(v > n.value)... } insert(v) { if(root = null) root = v; else insert(root, v); } 5. Why do we use generics instead of using Object as a reference type? A: objects might have to be casted while with generics you always know what you are dealing with in term of type/properties 6. Making a class and methods generic? 7. Something about class Cat and Dog extending an An
More Less

Related notes for CPSC 1045

Log In


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


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.