Thursday, September 16, 2010

Homework from the class of Sept 15, 2010


As discussed in the class, here is the homework for this week.

Write an algorithm to search for a number in a list of given numbers.
–Should take a list of numbers a1, a2, ... an, and a key "k" as input.
–Should return "YES" if the k is the same as one of a1, ... an, else return "NO".

Also write a proof of correctness and proof of finiteness

Deadline: Sunday, Sept 19, 2010.

No comments:

Post a Comment