Work in HR? Unlock Free Profile

VMware Software Engineer Interview Question

I interviewed in Seattle, WA and was asked:
"You are given a dictionary, such as /usr/share/dict/words, containing a list of words, one per line. You are also given seven tiles. Each tile is either blank or contains a single lowercase letter (a-z). List all of the words from the dictionary that can be produced by using some or all of the seven tiles, in any order. A blank tile is a wildcard, and can be used in place of any letter. Try to use a minimal amount of memory. 1. Find all of the words that can be formed if you don't have to deal with blank tiles. (You may skip this step and go straight to step 2). 2. Find all of the words that can be formed, including those where blank tiles are used as wildcards. 3. Would you do things differently if you had to process several hundred tile sets with the same dictionary?"
Tags: algorithm, coding
Add Tags [?]

Part of a Software Engineer Interview Review - one of 420 VMware Interview Reviews

Answers & Comments

of 0

I provided a brute force solution.

- Interview Candidate on Oct 28, 2013
of 1

I think terinary search tree is better for this. minimal space.

- Chaithanya on Jan 8, 2014
of 0

What about a bloomfilter on the dictionary to quickly search if the tile permutation is inside the dictionary or not?

- Anonomous on Apr 19, 2014

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.