

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


A. It is typically much faster than sequential search.
C. When data is sorted, it is easy to cut the amount of data to search in half.
6 20 3 2 1 + * + +
6 20 3 3 * + +
6 20 9 + +
6 29 +
35
abb(ab|ba)
A. abb
D. bbbaab
a) does not match any of the methods. Note that a call with the number "7" would infinite loop for method f().
b) f()
c) g()
d) h()
May 1, 2008
a) 3 instance variable declaration
b) 4 constructor signature
c) 19, 20 object creation
d) 6, 11 overloaded method signature
e) 21, 22 method invocation or call
f) 3, 18 primitive type variable declaration
g) 19, 20 reference type variable declaration
a) The truth table.
a b c x 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0
b) Boolean Expressions equivalent to the circuit.
b. ab' + bc'
e. a'bc' + ab'c' + ab'c + abc'