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
CSC190: Computer Algorithms and Data Structures
Lab 4
Assigned: Feb 7, 2016; Due: Feb 22, 2016 @ 10:00 a.m.
1
Objectives
In this lab, basic concepts behind object-oriented programming (OOP) are introduced. OOP promotes
abstraction, modularity and portabil
CSC190: Computer Algorithms and Data Structures
Lab 2
Assigned: Jan 18, 2016; Due: Jan 25, 2016 @ 10:00 a.m.
1
Objectives
The main goal of this lab is to showcase how powerful pointers can be and the degree of care programmers
must take to ensure proper u
CSC190: Computer Algorithms and Data Structures
Assignment 1
Assigned: Jan 13, 2016; Due: Feb 7, 2016 @ 10:00 p.m.
1
Objectives
Engineering computations typically involve many instances requiring various types of matrix manipulations.
In many courses you
CSC190: Computer Algorithms and Data Structures
Lab 6
Assigned: Mar 7, 2016; Due: Mar 11, 2016 @ 10:00 a.m.
1
Objectives
The purpose of this lab is to use queue and heap ADTs to build a priority queue. Priority queue is an
example of an ADT that is built
CSC190: Computer Algorithms and Data Structures
Assignment 2
Assigned: Feb 11, 2016; Due: Mar 14, 2016 @ 10:00 a.m.
1
Objectives
The queue data structure can be used for modelling and simulating many interesting systems. In many
practical systems, some ki
CSC190: Computer Algorithms and Data Structures
Lab 5
Assigned: Feb 21, 2016; Due: Feb 29, 2016 @ 10:00 a.m.
1
Objectives
In the first part of this lab, you will implement general operations for a specific type of linked list called
the ordered list. In t
CSC190: Computer Algorithms and Data Structures
Assignment 3
Assigned: Mar 20, 2016; Due: Apr 8, 2016 @ 10:00 a.m.
1
Objectives
In this assignment, you will implement an algorithm that computes the maximum flow possible in a flow
network digraph. A flow n
CSC190: Computer Algorithms and Data Structures
Lab 1
Assigned: Jan 11, 2015; Due: Jan 18, 2015 @ 10:00 a.m.
1
Objectives
Fundamental nuances of the programming language C that include selection statements, types, loops and
arrays introduced in the first
CSC190H1: Computer Algorithms and Data Structures
Winter 2014
Division of Engineering Science
Faculty of Applied Science & Engineering
University of Toronto St. George
Semester: Winter 2014
CSC190H1 Computer Algorithms and Data Structures
Lab 7: Week of M
CSC190H1: Computer Algorithms and Data Structures
Winter 2014
Division of Engineering Science
Faculty of Applied Science & Engineering
University of Toronto St. George
Semester: Winter 2014
CSC190H1 Computer Algorithms and Data Structures
Lab 0: Week of M
#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
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
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
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
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
CSC190H1: Computer Algorithms and Data Structures
Winter 2014
Division of Engineering Science
Faculty of Applied Science & Engineering
University of Toronto St. George
Semester: Winter 2014
CSC190H1 Computer Algorithms and Data Structures
Lab 2: Week of M
CSC190H1: Computer Algorithms and Data Structures
Winter 2014
Division of Engineering Science
Faculty of Applied Science & Engineering
University of Toronto St. George
Semester: Winter 2014
CSC190H1 Computer Algorithms and Data Structures
Lab 4: Week of M
CSC190H1: Computer Algorithms and Data Structures
Winter 2014
Division of Engineering Science
Faculty of Applied Science & Engineering
University of Toronto St. George
Semester: Winter 2014
CSC190H1 Computer Algorithms and Data Structures
Lab 6: Week of M
CSC190: Computer Algorithms and Data Structures
Lab 7
Assigned: Mar 14, 2016; Due: Mar 21, 2016 @ 10:00 a.m.
1
Objectives
In this lab, you will explore using available interface functions of a linear data structure which aid with the
operations performed
Winter 2016 Syllabus
Computer Algorithms and Data Structures
CSC190HS
Division of Engineering Science
University of Toronto
Instructor
Pirathayini Srikantha
Email: [email protected]
Website: http:/www.ecf.utoronto.ca/~srikan48
Course
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:
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
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
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 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
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 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 Syllabus
Computer Algorithms and Data Structures
CSC190HS
Division of Engineering Science
University of Toronto
Instructor
Pirathayini Srikantha
Email: [email protected]
Website: http:/www.ecf.utoronto.ca/~srikan48
Course