Problems and Algorithms
Linear Search (A[1.n],v)
Pseudo code: 1. / Input: array of n numbers a[1.n] 2. / and key value v to be searched for. 3. / Output: an integer index i into the array a (1<=i<=n) 4. / such that A*i+ = v, or the special value NIL
CSE 340 Algorithms First Exam
Wednesday, February 28, 9:1010 AM
Packard Lat) 10] (Auditor-turn)
Please strive for clarity and completeness in your answers.
To enable us to award partial credit? show details of your work
(unless you are specically instr
Homework 3
Due Thursday Sep 22: on coursesite, at 10:45am
CSE/Math 340: Fall 2016
Some questions here may depend on lecture from Tuesday Sep 20
1. (10 points) Put the integers 1, 2, . . . , 16 into a max-heap. Illustrate your heap both as a tree and as an
Homework 1
Due Thursday Sep 8: on coursesite, at 10:45am
CSE/Math 340: Fall 2016
Question 6 pertains to topics scheduled for Tuesday Sept. 6, but you should be able to address the first 5
questions after the Thursday Sept. 1 class.
For the each of the fir
Homework 2
Due Thursday Sep 15: on coursesite, at 10:45am
CSE/Math 340: Fall 2016
Some questions here may depend on lecture from Tuesday Sep 13
1. (10 points) Use the backwards-substitution method or the recursion-tree method to find closed-form
solutions