Given the word jumble (i.e. ofbaor), what would be the approach to deciphering the letters to create a real word (i.e. foobar)? I could see that this has several approaches, and I think I know how I will do it in .NET, but I'm curious to see what other solutions look like (always happy to see if my solution is optimal or not).
This is not homework or something like that, I just noticed that a word appeared in the local comics section of the newspaper (yes, a good newfangled news feed), and the engineer began to think in me.
edit: please write some pseudo-code or real code if you can; it is always a pleasure to try and expand your knowledge of the language by seeing such examples.
language-agnostic puzzle
CodeMonkey1313 Apr 27 '10 at 14:38 2010-04-27 14:38
source share