The points are, I think, mainly awarded for the way you executed the parsing of the search
string in criteriaFind and the appropriate delegation of the actual search to other methods. You are certainly not supposed to do anything other than linear searching (or let me put it differently: you won't lose points because your search is dumb).
Your estimates don't look correct. In criteriaFind you're giving the field names along with the values they're supposed to have, so M doesn't enter the equation at all (at most, the number of criteria fields does). In a real database, the optimiser would try to do the most discriminating search (field) first that had an index. The time taken would be O(log(N)) for a Bayer tree index, O(1) for a hash index. Provided the result set from this first field is small enough the time taken for the remainder of the search would be small.
- Peter