Filter By
Filter Reset
Exam Types
  • All Exams
  • Final (74)
  • Midterm (20)
Semester
Study Guides (330,235)
CA (146,908)
WLU (5,475)
CP (165)
CP164 (94)

Study Guides for CP164 at Wilfrid Laurier University

Data Structures I

Exam Study Guides for CP164

Covers all exam topics.

CP164 Final: Stacks

Notes Stacks The Mirror Problem We have already used stacks check if brackets are properly balanced. We can use a similar idea to determine if a string is a mirror. A mirror can be thought of as a special form of a palin...

Computer Science
CP164
Basil
CP164 Final: Stacks

Notes Stacks The Mirror Problem We have already used stacks check if brackets are properly balanced. We can use a similar idea to determine if a string is a mirror. A mirror can be thought of as a special form of a palin...

Computer Science
CP164
Basil
CP164 Study Guide - Final Guide: Alex Proyas, Data Element, Binary Search Algorithm

def write(self, fv): Writes a single line of movie data to an open file fv in the format titleyeardirectorratingcode Use: movie.write(fv) Parameters: fv an already open file of movie data (file) Returns: None Your c...

Computer Science
CP164
Basil
CP164 Study Guide - Final Guide: Alex Proyas, Data Element, Binary Search Algorithm

def write(self, fv): Writes a single line of movie data to an open file fv in the format titleyeardirectorratingcode Use: movie.write(fv) Parameters: fv an already open file of movie data (file) Returns: None Your c...

Computer Science
CP164
Basil
CP164 Final: Interlude copy

Interlude Passing Functions Sometimes we wish to process the nodes in a data structure is a way that cannot handled by any of the ADTs defined methods. Say, for example, we wish to update a particular field in an object, ...

Computer Science
CP164
Basil
CP164 Study Guide - Final Guide: Wrapper Function, 5,6,7,8, Priority Queue

Calling this wrapper function is simple - just pass the name - and only the name - of the function you wish to execute, and that function is executed wherever the parameter name func appears: print "Executing 'sqred':" ...

Computer Science
CP164
Basil Dudin
CP164 Study Guide - Final Guide: Cemetery Man, Init

Hashing At some point it may be useful to increase the number of available slots instead of continuing to grow the Lists attached to the slots. The decision on when to do this is based upon a load factor. A load factor of...

Computer Science
CP164
Basil Dudin
CP164 Study Guide - Final Guide: Selection Sort, If And Only If

Algorithm Analysis Can we be more precise? What do we mean by proportional to? Twice a long? Ten times as long? The following table and graph show running times for the Selection Sort on different platform...

Computer Science
CP164
Basil Dudin
CP164 Final: Binary Search Tree Insertion

Binary Search Tree Insertion Inserting Into a BST To insert into a BST we perform some of the same steps that we do when searching for a key in the tree. However, nodes are always inserted as leaves, i.e. at the bottom of ...

Computer Science
CP164
Basil Dudin
CP164 Final: Binary Search Tree

Binary Search Tree insert is a public BST method that takes a value as a parameter and attempts to insert that value into its proper place in the BST. If it succeeds, itTrue,rns and False otherwise.insert does not do much ...

Computer Science
CP164
Basil Dudin
CP164 Final: BST Insertion

BST Insertion: Call Trace A Call Trace is simply a visual representation of a series of recursive function calls. Each call is indented to show the ownership of the call and to show the differences between the base and gen...

Computer Science
CP164
Basil Dudin
CP164 Final: Binary Search Trees

Binary Search Trees A binary tree is a nonlinear data structure. A binary tree is either the empty tree or a node that has left and right subtrees that are binary trees. (This is a recursive definition.) A binary search tr...

Computer Science
CP164
Basil Dudin
CP164 Final: auxiliary function

Linked Recursion The solution is to use an auxiliary function that works with the node portion of the List only. Although we can claim thaprint_r is recursive, the actual recursion is done in its auxiliary function. This p...

Computer Science
CP164
Basil Dudin

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