Binary Decision Diagrams (2010)
<i>List all 5-letter words that remain words after replacing a b with o. How can we solve these efficiently?</i><p>Put them in a set(), then iterate over its members and report any that contain b and are still in the set after the string replacement. O(n), which can't be beaten.<p>Edit: If you're downvoting, could you post a comment saying why?