- 0of 0 votes
1. You have a set of 10000 ascii strings (such as perhaps loaded from a file)- huangyingw November 20, 2012 in United States
2. A string is input from stdin.
3. Write pseudocode that returns (to stdout) a subset of strings in (1) that contain the same distinct characters (regardless of order) as input in (2). Optimize for time.
4. Assume that this function will need to be invoked repeatedly. Initializing the string array once and storing in memory is okay . Please avoid solutions that require looping through all 10000 strings.
For example, if you have strings in (1): mary, brad, pitt, yygr
and the user types in: ry --> the output should be "mary" and "yygr"
or if the user types in: dd --> brad
| Report Duplicate | Flag | PURGE
Interview Type: Phone Interview