Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question is asking for the pseudocode mainly:

Design an algorithm that would play "Word Game." In Word Game an English word is supplied, then one is supposed to form as many words that are at least 4 letters long as one can from the letters. If the word was "combinatorics " we get:

antics, arts, boast, etc.

The design should be in high-level terms. Assume avail. of an online dictionary that permits O(1) lookups, that is, the amount of time is not affected by word length. With this assumption, estimate the time complexity of solution in terms of O(f(n)), where (f(n) is a function of n, the length of the given word.

I'm stumped overall, also am not sure that is meant by "complexity of solution in terms of O(f(n))"

Thanks so much

share|cite|improve this question
up vote 2 down vote accepted

I think the coding question is off-topic here, and there are other sites for it. To say the complexity is, say, $O(n^2)$, is to say that the number of operations (lookups and comparisons and such) that you have to do is, for large $n$, less than $Cn^2$ for some constant $C$.

share|cite|improve this answer
Thank You Very Much! – Adel Apr 23 '12 at 13:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.