Algorithms and Data Structures (INF1, Autumn'05)

Exercise Set 10



Exercise 1:

Suppose we are hashing finite strings over the alphabet {a,b,c}. (examples of strings are: a, bc, abcab, aaaa).

Exercise 2 (hand-in):



Exercise 3:

Assume that we have two nonempty sets of elements of the same size: s1={a1, a2, ..., an} and s2={b1, b2, ..., bn}. The sets are stored as sequences in arrays A[1..n] and B[1..n] such that A[i]=ai and B[i]=bi for all i=1 to n.