If the word is randomly chosen from the dictionary, then there isn't any general method that would get the solution faster than trying them all in order.
Of course there is! Read the shortest words first where "short" refers to how quickly you can read the word aloud.
Just be sure to not count the sorting time in the benchmark and don't let them find out about your strategy or they'll pick the longest word next time... unless you can let them know of your strategy in a way where they think you don't know that they know, in which case next time you'd be pretty sure they did pick the longest word... but they'd probably not pick the very longest word, just a really long word, so it'd be better if you could get them to think you thought they didn't know that you knew that they knew so they'd pick a really short word because you could go through short words faster since they are, well, short... unless there are a lot more short words in the dictionary than long words, ...
- tye (well, you get the idea)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|