Internal Consultant Interview Questions

6,460 internal consultant interview questions shared by candidates

We have strings of format A_ _ _ _ _ _ _, an A followed by 6 spaces that can be a number 0-9. We also have regular expressions with the operations "or" and "*" defined as follows:. The easiest way to illustrate this is to give an example. "A000001 or A000000" has size 2 because it matches two strings. "*" represents a wild card, so A00000* has size 10 because it matches 10 different strings, (A000000 - A000009). "A0* or A1*" has size 20,000 because it matches 20,000 different strings. The question was this: Write a function that takes in a number N and outputs a regular expression that matches exactly N strings of format A _ _ _ _ _ _.
avatar

Internal Applications Software Engineer

Interviewed at Palantir Technologies

3.7
Mar 10, 2015

We have strings of format A_ _ _ _ _ _ _, an A followed by 6 spaces that can be a number 0-9. We also have regular expressions with the operations "or" and "*" defined as follows:. The easiest way to illustrate this is to give an example. "A000001 or A000000" has size 2 because it matches two strings. "*" represents a wild card, so A00000* has size 10 because it matches 10 different strings, (A000000 - A000009). "A0* or A1*" has size 20,000 because it matches 20,000 different strings. The question was this: Write a function that takes in a number N and outputs a regular expression that matches exactly N strings of format A _ _ _ _ _ _.

Viewing 21 - 30 interview questions

Glassdoor has 6,460 interview questions and reports from Internal consultant interviews. Prepare for your interview. Get hired. Love your job.