GeorgeBaciu
Q00:DataStructuresandAlgorithms
10January2012
Quiz00:Lecture01IntroductiontoDSA
Introduction
This quiz will be mainly a course reference quiz to get you started on the material and know where all
theinformationis.Pleasecheckperiodicallyforme
EL9343
Data Structure and Algorithm
Lecture 2: Mathematical Foundations,Solving Recurrences
Instructor: Yong Liu
Last Lecture
How to evaluate the efficiency of algorithm
By running time
As a function of the input size n (i.e., f(n).
Asymptotic analysi
Homework 3 Solution
Professor Liu Yong
EL 9343 - Data Structure and Algorithm
October 22, 2016
Exercise 1. CLRS 7-3
P
a. E[Xi ] is simply nj=1 P r(selectj jistheith smallestelement). Since these two events are
P
independent, so we can break the product ap
EL9343
Data Structure and Algorithm
Lecture 3: Divide-and-Conquer algorithms, Introduction to Sorting
Instructor: Yong Liu
Some slides from David Luebke & George Bebis
Last Lecture: Solving Recurrence
Recursion tree
Convert recurrence into a tree
Eac
EL9343 Homework 2 Solutions
1. If we divide the original array A into 3 equal-sized sub-arrays S1, S2, and S3, we have 3
special cases to consider in the combine phase of the divide-and-conquer algorithm:
(a) head in S1, tail in S2 : linear sweep in S1 to
EL9343
Data Structure and Algorithm
Lecture 4: Introduction to sorting II: HeapSort, Quicksort
Instructor: Yong Liu
Last Lecture
Divide-and-conquer algorithms
Insertion sort
2
maximum subarray
Design approach:
Sorts in place:
Best case:
Worst case:
EL9343
Data Structure and Algorithm
Lecture 7: Binary Search Tree (Cont.d), Midterm Review
Instructor: Yong Liu
Binary Search Tree Property
Binary search tree property:
If y is in left subtree of x,
then key [y] key [x]
5
3
If y is in right subtree of
EL9343
Data Structure and Algorithm
Lecture 6: Hash Tables, Binary Search Tree
Instructor: Yong Liu
The Search Problem
Find items with keys matching a given search key
2
Given an array A, containing n keys, and a search key x,
find the index i such as
6.096 Introduction to C+
Massachusetts Institute of Technology
January 5, 2011
John Marrero
Lecture 2 Notes: Flow of Control
1
Motivation
Normally, a program executes statements from first to last. The first statement is executed,
then the second, then th
Home work 1
Due date: 09/19/2016
1. Look up the words algorism and algorithm in your dictionary and write down their meaning. (2
points)
2. Write down your understanding i) Validation of algorithms and ii) Analyzing algorithms (4
points)
3. Show that f(n)
New York University Polytechnic School of Engineering
Brooklyn, NY 11201
CS 5403
Fall 2015
Data Structures and Algorithms
Professor Katz
E-Mail(best contact method): [email protected] (use subject C5403)
Phone: 646-997-3657
Office: 2MTC 10.027
Office Hours: T
Fibonacci(n):
if n = 0 then / base case
return 0
elseif n = 1 then / base case
return 1
else
return Fibonacci(n - 1) + Fibonacci(n - 2)
endif
How can I prove the correctness of this algorithm by induction?
The proof is by induction on n. Consider the case
Solution # 1 - Section A COMP305 Data Structures and Algorithms Spring 2012
Room: Y305
Friday @ 8:30-11:00
20-Jan-2012
Given Name
Marks
Student ID
Family Name
10
* Instructions: Please answer the following questions in the space provided. This is a closed
Solution # 0 - Section A COMP305 Data Structures and Algorithms Spring 2012
Room: Y305
Master
Friday @ 08:30-08:45
Marks
13-Jan-2012
10
Solutions
Instructions: Please answer the following questions in the space provided. This is a closed book quiz. No aid
Solutions # 0 - Section B COMP305 Data Structures and Algorithms Spring 2012
Room: Y409
Wednesday @ 14:30-14:45
11-Jan-2012
Given Name
Marks
Student ID
Family Name
10
Instructions: Please answer the following questions in the space provided. This is a clo
GeorgeBaciu
Q01:DataStructuresandAlgorithms
16January2012
Quiz01:Lectures0102Analysis&Recursion
Introduction
This quiz will be mainly a course reference quiz to get you started on the material and know where all
theinformationis.Pleasecheckperiodicallyf
Solutions # 1 - Section B COMP305 Data Structures and Algorithms Spring 2012
Room: Y409
Wednesday @ 14:30-14:45
Marks
18-Jan-2012
Family Name
Given Name
Student ID
Master
Master
88888888
10
10
Instructions: Please answer the following questions in the spa
GeorgeBaciu
Q02:DataStructuresandAlgorithms
4February2012
Quiz02:Lectures0304L&NLDataStructures
Introduction
This quiz will be testing your understanding of linear and nonlinear data structures. Please revise
lectures 03 an 04 for this quiz and please g
GeorgeBaciu
Q03:DataStructuresandAlgorithms
20February2012
Quiz03:Lectures0405Trees,Graphs,Sorting
Introduction
This quiz will be testing your understanding of linear and nonlinear data structures. Please revise
lectures 03 an 04 for this quiz and pleas
GeorgeBaciu
Q04:DataStructuresandAlgorithms
6March2012
Quiz04:Lectures0607SortingandSearching
Introduction
This quiz will be testing your understanding of linear and nonlinear data structures. Please revise
lectures 06 an 07 for this quiz and please go
GeorgeBaciu
Q05:DataStructuresandAlgorithms
19March2012
Quiz05:Lectures0709HashingandGraphs
Intro ductio n
This quiz will give you a chance to review hash tables and graph data structures and algorithms such as
BFS and DFS and applications. Please revis
Introduction to C+
Massachusetts Institute of Technology
January 4, 2011
6.096
Lecture 1 Notes: Introduction
1
Compiled Languages and C+
1.1
Why Use a Language Like C+?
At its core, a computer is just a processor with some memory, capable of running tiny