Winter 2015 Syllabus
Computer Algorithms and Data Structures
CSC190HS
Division of Engineering Science
University of Toronto
Instructor
Pirathayini Srikantha
Email: pirathayini.srikantha@mail.utoronto.ca
Website: http:/www.ecf.utoronto.ca/~srikan48
Lecture
CSC190: Computer Algorithms and Data
Structures
Recursion
Instructor: Pirathayini Srikantha
University of Toronto
January 11, 2015
Readings/References
Recursion: Standish (3)
Table of Contents
1 Recursion Basics
2 Example: Sum of Squares
3 Example: Rever
CSC190: Computer Algorithms and Data
Structures
Introduction to Pointers
Instructor: Pirathayini Srikantha
University of Toronto
January 13, 2015
Readings/References
Pointers: King (11), Schildt (5)
Arrays and Pointers: (King 12), Schildt (4)
Table of C
CSC190: Computer Algorithms and Data
Structures
Hash Tables
Instructor: Pirathayini Srikantha
University of Toronto
March 11, 2015
Readings/References
Standish (11)
Table of Contents
1 Introduction to Hash Tables
2 Collision Resolution Policies
3 Attribu
CSC190: Computer Algorithms and Data
Structures
C Fundamentals
Instructor: Pirathayini Srikantha
University of Toronto
January 9, 2015
Readings/References
Basic C Program: King (1.2, 2.2, 9.1, 9.2), Schildt (1)
Types in C: King (7, 2.4, 8), Schildt (2)
CSC190: Computer Algorithms and Data
Structures
Sorting Algorithms
Instructor: Pirathayini Srikantha
University of Toronto
March 29, 2015
Readings/References
Standish (13)
Table of Contents
1 Introduction
2 Basic Sorting
Bubble Sort
Insertion Sort
3 Prio
CSC190: Computer Algorithms and Data
Structures
Dynamic Memory Allocation
Instructor: Pirathayini Srikantha
University of Toronto
January 19, 2015
Readings/References
Dynamic Memory Allocation: King (17.1, 17.3, 17.4), Schildt (16)
Pointer to a Pointer:
Basic data types:
- 3 main types: integer, floats, char
- Further classified based on needs and resource constraints
- processing (e.g. 64 bit machine etc.)
- storage
- signed (positive/negative), or unsigned
Integers: whole numbers (non-fractional values
Florence Chan
Winter 2015
Review Questions
Question 1.
[12 marks]
Sub-questions are based on the following code snippet:
int i=1;
int *p;
int *q;
Assume that the following assignments follow immediately after the above code snippet. Comment whether
these
Laplace transforms:
e st f (x)dt
(x)=
0
L cfw_f
s
( 2+b 2)
b
L cfw_ sinbt ( s )=
1
sa
b
L= cfw_ sinbt ( s )= 2 2
s +b
L cfw_ e at ( s )=
for s > 0
for s > 0
Definition
A function f(t) is called piecewise continuous on [a,b], if:
1) It is continuous
Lecture 2: Learning Objectives
What are the 9 fundamental properties of cells?
1. Cells are highly complex and organized
2. Cells possess a genetic program and means to use it
3. Cells are capable of reproducing more of themselves
4. Cells acquire and ut
#How to make a vector
vector1 <= c(1, 2,3,4,5,6)
# low-level user
v3 <-numeric(6)
# numeric creates the space
for ([i]:length(v1)
#R is a stupid language and starts indexing at 1
# to test the speed use the microbenchmark library
library(microbenchmark)
l
CSC190
Introduction to Analysis of Algorithms
Instructor: Pirathayini Srikantha
University of Toronto
February 2, 2015
Readings/References
Standish (6)
Table of Contents
1 Motivation
2 Formal Definition of O-Notation
3 Other Asymptotic Notations
4 Exampl
UNIVERSITY OF TORONTO
FACULTY OF APPLIED SCIENCE AND ENGINEERING
FINAL EXAMINATION, APRIL 2012
CSC 190 H18 — ALGORITHMS AND DATA STRUCTURES
Calculator Type: 4 (none)
Examination Type: D (course textbook and printouts of lecture slides and code)
Examiner:
Winter 2015 Syllabus
Computer Algorithms and Data Structures
CSC190HS
Division of Engineering Science
University of Toronto
Instructor
Pirathayini Srikantha
Email: pirathayini.srikantha@mail.utoronto.ca
Website: http:/www.ecf.utoronto.ca/~srikan48
Course
CSC 190 H1S
Test #1 Marking Scheme
Winter 2016
Note to Students: This file contains sample solutions to the term test. Please read the solutions
carefully. Make sure that you understand why the solutions given here are correct, that you understand
the mis
Winter 2015
Question 1.
[26 marks]
The following are multiple choice questions. For each question, please circle an option that is correct. Note
that if you circle an option that is not correct, you will not be awarded any marks for that question.
Part (a
CSC 190 H1S
Test #1 Solutions
Winter 2015
Note to Students: This file contains sample solutions to the term test. Please read the solutions
carefully. Make sure that you understand why the solutions given here are correct, that you understand
the mistakes
CSC 190 H1
Midterm Test #2 Solutions
Winter 2012
Note to Students: This file contains sample solutions to the term test together with the marking
scheme and comments for each question. Please read the solutions and the marking schemes and comments
careful
CSC 190 H1
Midterm Test #1 Solutions
Winter 2012
Note to Students: This file contains sample solutions to the term test together with the marking
scheme and comments for each question. Please read the solutions and the marking schemes and comments
careful
UNIVERSITY OF TORONTO
FACULTY OF APPLIED SCIENCE AND ENGINEERING
FINAL EXAMINATION, APRIL 2015
CSC 190 H1S COMPUTER ALGORITHMS AND DATA STRUCTURES
Exam Type: C NO calculator allowed
Examiner(s): Pirathayini Srikantha
Student Number:
Family Name(s):
Given
CSC190 COMPUTER ALGORITHMS AND DATA STRUCTURES 20141
CSC190 Syllabus!
1. Course Instructors!
Name
Jason Foster
Olivier St-Cyr
Email
jason.foster@utoronto.ca
stcyr@mie.utoronto.ca
Office Hours First contact, first scheduled
Monday:
Tuesday:
Wednesday:
1330
Winter 2011
Midterm TestSolutions
CSC 190 H1
Note to Students: This file contains sample solutions to the term test together with the marking
scheme and comments for each question. Please read the solutions and the marking schemes and comments
carefully.
UNIVERSITY OF TORONTO
FACULTY OF APPLIED SCIENCE AND ENGINEERING
FINAL EXAMINATION, APRIL 2011
CSC 190 H1S — ALGORITHMS, DATA STRUCTURES, AND LANGUAGES
Calculator Type: None
Examination Type: X
Examiner(s): Francois Pitt and Kante Easley
Student Number:
UNIVERSITY OF TORONTO
FACULTY OF APPLIED SCIENCE AND ENGINEERING
FINAL EXAMINATION, APRIL 2010
CSC 190 H18 — ALGORITHMS, DATA STRUCTURES, AND LANGUAGES
Exam Type: C — NO calculator allowed
Examiner(s): Francois Pitt and Paul Gries
Student Number:
Family
By Bernoullis Theorem we know:
1 2
1 2
Pa + v a=P b+ v b
2
2
1
PaPb = P ( v 2b v 2a )
2
[1]
PaPb =h ( hg ) g
[2]
We also know that
Then subbing in [1] into [2]:
1
P ( v 2b v 2a ) =h ( hg ) g
2
[3]
We also know,
Aa
2 ( Pa Pb )
( A b1)
v a=
plug in [3] for