|
|
|
|
|
by JL2010
5428 days ago
|
|
I had a similar question with a twist asked of me during an interview. It went something like this: Given a list of all the short strings in the periodic table of elements (e.g. Na, F, Al, etc) and a list of all the words in the English language: 1) write a method that finds the longest possible English word you can spell given any combination of the strings in the periodic table of elements. Re-usage of elements in the same string are allowed. 2) Describe what kind of data types you would want for the two lists and describe anything special about them. 3) Give a big O estimation. I thought it was a great question :) |
|