4n log n + 2n 3n + 100 log n n 2 + 10n
210 4n n3
2log n 2n n log n
d ( n) is O( f ( n) and e( n) is O( g ( n), then the product d ( n)e( n) is O( f ( n) g ( n).
O(log n)
h( i) = (2i + 5) mod11
h ( k ) = 7 ( k mod 7)
4n log n + 2n 3n + 100 log n n 2 + 10n
210 4n n3
2log n 2n n log n
210 2log n 3n + 100 log n 4n n log n 4n log n + 2n n 2 + 10n n3 2n
d ( n) is O( f ( n) and e( n) is O( g ( n), then the product d ( n)e( n) is O( f ( n) g ( n).
d ( n) O( f ( n) e( n) O( g
4n log n + 2n 3n + 100 log n n 2 + 10n
210 4n n3
2log n 2n n log n
210 2log n 3n + 100 log n 4n n log n 4n log n + 2n n 2 + 10n n3 2n
d ( n) is O( f ( n) and e( n) is O( g ( n), then the product d ( n)e( n) is O( f ( n) g ( n).
d ( n) O( f ( n) e( n) O( g
York University CSE 2011Z Winter 2010 Midterm Tues Feb 23
Instructor: James Elder 1. (5 marks) Big-Oh Denition Fill in the blanks: f (n) O(g (n) i c > 0, n0 > 0, such that n n0 , f (n) cg (n)
Answer: f (n) O(g (n) i c > 0, n0 > 0, such that n n0 , f (n)
<!DOCTYPE HTML PUBLIC "-/IETF/DTD HTML 2.0/EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /course/2011/WisdomForRoad.txt was not found on this server.</p>
<hr>
<address>Apache/2.2.15 (Unix) mod_ssl/2.2
Review Questions
No solutions will be posted. We will solve a subset of the following problems in the lecture on December 8. NOTE: As you may have noticed, we used a lot of examples and diagrams in the lectures. So email is not an effective method to answ
Department of Computer Science and Engineering
CSE 2011: Fundamentals of Data Structures
Winter 2009, Section Z Instructor: N. Vlajic Date: April 14, 2009
Midterm Examination
Instructions:
Examination time: 75 min. Print your name and CS student number i
Department of Computer Science and Engineering
CSE 2011: Fundamentals of Data Structures
Winter 2009, Section Z Instructor: N. Vlajic Date: April 14, 2009
Midterm Examination
Instructions:
Examination time: 75 min. Print your name and CS student number i
30
24
40
11
26
58
13
48
18 16 14 12 10 8 6 4 2 0
0 18 14 10 6 2 4 8 12 16
2n
2n
O( n log n) O ( n) O( n log n) O( n log n) O ( n)
O( n2 )
QuickSort(A) stack S push A onto S while S A = pop(S ) if A.length > 1 ( L, R) = Partition(A) push R onto S push L on
Department of Computer Science and Engineering York University, Winter 2009
CSE 2011: Assignment 3
Due Date - Saturday, May 23, 7pm!
Question 1
3-ary Tree
[35 points]
Let T be a full 3-ary tree (see Figure 1); that is, each parent has exactly 3 children.
Department of Computer Science and Engineering York University, Winter 2009
CSE 2011: Assignment 3
Due Date - Saturday, May 23, 7pm!
Question 1
3-ary Tree
[35 points]
Let T be a full 3-ary tree (see Figure 1); that is, each parent has exactly 3 children.
Department of Computer Science and Engineering York University, Winter 2009
CSE 2011: Assignment 2
Due Date - Friday, May 11, by Noon !
Question 1
Binary Tree Traversal
[15 points]
The recursive implementations of Preorder and Inorder Traversal on a binar
Department of Computer Science and Engineering York University, Winter 2009
CSE 2011: Assignment 2
Due Date - Monday, May 11, by Noon !
Question 1
Binary Tree Traversal
[15 points]
The recursive implementations of Preorder and Inorder Traversal on a binar
Department of Computer Science and Engineering York University, Winter 2009
CSE 2011: Assignment 1
Due Date - Monday, April 13, by Noon !
Question 1 Algorithm Design
[2 points]
Assume an arbitrary set of n distinct numbers (S). Devise an algorithm for out
Department of Computer Science and Engineering York University, Winter 2009
CSE 2011: Assignment 1
Due Date - Monday, April 13, by Noon !
Question 1
Algorithm Design
[10 points]
Assume an arbitrary set of n distinct numbers (S) distributed over an interva