Yesterday someone mentioned the Sling Blade Runner problem from their archives and I can't stop thinking about it. * http://www.itasoftware.com/careers/puzzle_archive.html?catid... * http://stuffthathappens.com/blog/2007/10/03/sling-blade-runn... I'm in the middle of writing a web-based anagram server and there's some similarities in both these problems. You have a dictionary that you iterate through recursively to f…
ITA Software's Hiring Puzzles
11–20 of 45 posts
Re: ITA Software's Hiring Puzzles
#12Earlier quoted context omitted.
They produce more false negatives than false positives. If you aren't in a hurry to grow, thats a good thing. Even "cheating" (memorizing the techniques) to the point of being able to solve a problem on site (which is part of the interview) is not trivial.
What do you mean by false negative?
false positive = allowing bad candidate to pass
Re: ITA Software's Hiring Puzzles
#13Earlier quoted context omitted.
Are you looking to pre-generate the results or generate them dynamically? I think MapReduce will only be effective for the former.
There are no map-reduce implementations that work in real-time? I thought Google search worked like that. I do want it to work dynamically.
You might find some of these links useful:
Re: ITA Software's Hiring Puzzles
#14Yesterday someone mentioned the Sling Blade Runner problem from their archives and I can't stop thinking about it. * http://www.itasoftware.com/careers/puzzle_archive.html?catid... * http://stuffthathappens.com/blog/2007/10/03/sling-blade-runn... I'm in the middle of writing a web-based anagram server and there's some similarities in both these problems. You have a dictionary that you iterate through recursively to f…
What do you mean by anagram solver? Find anagrams for a given word? Isn't that trivial by indexing words by the sorted version of the word? E.g. {"aep" -> ["ape", "pea"], ...}
Re: ITA Software's Hiring Puzzles
#15I'm curious, how useful to people think these kinds of puzzles are in hiring?
To use a recent movie quote: "If you can dodge a wrench, you can dodge a ball." ITA's business is all about dealing with fiendishly clever transforms on small-ish sets of data, and the results are needed Right Now. Most of the hiring puzzles revolve around that theme. Much like any other company giving these kinds of problems, it's not about bringing out that cleverness every day, but it's about figuring out who has…
http://www.demarcken.org/carl/papers/ITA-software-travel-com...
Re: ITA Software's Hiring Puzzles
#16Earlier quoted context omitted.
What do you mean by anagram solver? Find anagrams for a given word? Isn't that trivial by indexing words by the sorted version of the word? E.g. {"aep" -> ["ape", "pea"], ...}
Yes.
(You could index a list of phrases the same way, but users wouldn't be able to type in their name and find out what phrases it jumbles into.)
Re: ITA Software's Hiring Puzzles
#17Re: ITA Software's Hiring Puzzles
#18I sort of imagine that these puzzles have an outlier effect: it removes the top and bottom users from a selection pool. Maybe that's okay, personally I was a bit disappointed at the missed opportunity.
One way they could improve this is by giving the puzzles expiration dates, removing the fear of completing one far ahead of the interview process, and having it expire. You'll still miss out on those who haven't heard of ITA until the near-graduation career fairs, but it will at least improve the situation.
Re: ITA Software's Hiring Puzzles
#19I'm curious, how useful to people think these kinds of puzzles are in hiring?
Re: ITA Software's Hiring Puzzles
#20Yesterday someone mentioned the Sling Blade Runner problem from their archives and I can't stop thinking about it. * http://www.itasoftware.com/careers/puzzle_archive.html?catid... * http://stuffthathappens.com/blog/2007/10/03/sling-blade-runn... I'm in the middle of writing a web-based anagram server and there's some similarities in both these problems. You have a dictionary that you iterate through recursively to f…
For the Sling Blade Runner problem, I would make a trie (http://en.wikipedia.org/wiki/Trie) out of hash tables, like this:
trie = {
'dracula': {'': None,
'dead': {'and': {'loving': {'it': "Dracula: Dead and Loving It!"}}}},
'the': {'brides': {'of': {'dracula': "The Brides of Dracula"}}},
# ...
}
Then, for each word in each movie title, walk the trie from the beginning until you run out of matches (no match), or run out of words (at least one match).Your anagram server is similar, but since they're not ordered like movie titles, you have to walk your scrambled word(s) and only generate permutations that have a matching trie path.
It's also quite possible to do it for phrases, not just words.
You can cheat a little by representing your anagram as a 26-key multiset containing the number of times each letter appears (in Python, use a dict; in C, use an array of 26 integers).
For each letter that appears in your anagram multiset one or more times, make a copy of the original multiset, and recursively descend the Dictionary trie, removing each matching letter from a new copy of the multiset (they're tiny, so don't worry). For each complete word you find, add it to a list of result candidates, along with the multiset representing the remaining letters in the anagrammatic phrase.
Repeat the process for each result candidate, growing your list into a tree. Stop when you run out of matches, or when you run out of letters in your multisets. (You can set a maximum number of leftover letters to accept, if you're having trouble matching a phrase).
If you test the letters in alphabetical order, your result phrases will already be sorted.