CS 14 - Summer 2003 - Quiz 3
July 22, 2003
1
True/False
Circle T or F as appropriate. Running-time questions are all in terms of input size n
1. T F
Insertion into a 2-3 Tree has a running time of O(n
C+ Review
Most slides taken from HuaminQu.
Modified by Vagelis Hristidis.
Functions & Memory
n Everyfunctionneedsaplaceto
Memory
storeitslocalvariables.
Collectively,thisstorageiscalled location
thest
Review Session - Final
Slide 2
Binary search trees
Two binary search trees representing
the same set:
Average depth of a node is O(log N);
maximum depth of a node is O(N) [when
does it happen?]
Slide
Hashing 1
Hashing
Most slides taken from Huamin Qu.
Modified by Vagelis Hristidis.
Hashing 2
Hash table
Support the following operations
s
s
s
Find
Insert
Delete. (deletions may be unnecessary in some
CS 14 Midterm Review
C+
Pointers
Parameter passing
Function stack
Recursive calls memory issues
Big-Oh
O vs Omega vs Theta: definitions
Prove that 5n^2+3n+10=O(n^2)
Algorithms and complexity
estimatio
Fall 2016
CS14: Introduction to Data Structures and Algorithms
Syllabus
Lectures:
Time: 3:40pm 5:00pm, MW
Location: HMNSS 1501
Instructor:
Mart Molle
[email protected]
Office hours: Monday 1-2pm and Thu
CS 14 - Summer 2003 - Midterm Examination
July 23, 2003
1
Multiple Choice
Circle the letter of the correct answer.
1. Suppose you have a sorted array of 250 elements. What is the maximum number of
ele
CS 14 - Summer 2003 - Quiz 3
July 22, 2003
1
True/False
Circle T or F as appropriate. Running-time questions are all in terms of input size n
1. T F
2. T F
Insertion into a heap has running time of O(
CS 14 - Summer 2003 - Quiz 4
July 23, 2003
1
True/False
Circle T or F as appropriate.
1. T F
Hash tables using linear probing to resolve collisions have a worst case search
time of O(n), the number of
CS 14 - Summer 2003 - Quiz 4
July 23, 2003
1
True/False
Circle T or F as appropriate.
1. T F
Hash tables using linear probing to resolve collisions have a worst case search
time of O(n), the number of
CS 14 - Summer 2003 - Quiz 2
July 6, 2003
1
True/False
Circle T or F as appropriate. Running-time questions are all in terms of input size n
1. T F
Bubble-sort has a worst case of O(nlgn)
2. T F
Selec
CS 14 - Summer 2003 - Quiz 2
July 7, 2003
Note: Binary-tree questions are in terms of the simplest implementation of a pointer-based
binary tree:
struct Node
cfw_
int val;
Node* left;
Node* right;
1
CS 14 - Summer 2003 - Midterm Examination
July 23, 2003
CS 14 Midterm - Expected time: 80 minutes. The multiple choice section and the short
answer section of this exam are worth roughly equivalent am
CS 14 - Summer 2003 - Quiz 1
July 2, 2003
1
True/False
Circle T or F as appropriate. Running-time questions are all in terms of input size n
1. T F
n3 grows faster than n2 log42 n - Divide both by n2
CS 14 - Summer 2003 - Quiz 1
June 30, 2003
1
True/False
Circle T or F as appropriate. Running-time questions are all in terms of input size n
1. T F
n3 grows faster than n2 log42 n
2. T F
n grows fast
CS 141, Fall 2014
Quiz 2/A
Problem 1. (20 points [greedy])
Find a maximum-size subset of non-overlapping intervals (or non-conflicting tasks) from the set
of 26 intervals shown below, according to the