CSC263H5 Lecture Notes - Lecture 3: Doubly Linked List, Binary Search Algorithm, Floor And Ceiling Functions

52 views7 pages

Document Summary

Csc209h5s - software programming and tools (winter 2018) Ps1 q1 average case: there are two possible approaches: one from lecture 1 and one from tutorial 1. Ps1 q2: recall that h is an array, you decide where the index starts, you pseudocode should work correctly according to the assumption. Ps1 q3: note the ceiling function in [0. 613 x n] (section 3. 2) A set s where each node x has a field x. key (assumption: keys are district, unless otherwise specified) The key is what you want to search, add, store etc. You can assume that each key will only have one value. Note: k is a key, x is a node. Search(s, k): return x in s , s. t. , x. key=k. Insert(s, x): insert node x into s. Delete(s, x): delete a given node x from s. If already exists node y with the same key, replace y with x.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents