Internal Consultant Interview Questions

6,469 internal consultant interview questions shared by candidates

I happen to be the King and each year I receive 10 gold bars from each of 10 Barons in my Kingdom. My spies inform me that this year, one of the Barons will try to save money by shaving 1 gram from each of his bars. A legitimate bar weighs 100 grams, but there's no way to tell the difference between a legitimate bar and a shaved bar except by weighing. The Puzzle: I have a crusty old coin-operated "speak your weight" machine, and, being a bit cheap, I only want to use it once. How can I tell which Baron has been cheating me with only one weighing?
avatar

Internal Developer

Interviewed at Braintree

3.7
Sep 19, 2011

I happen to be the King and each year I receive 10 gold bars from each of 10 Barons in my Kingdom. My spies inform me that this year, one of the Barons will try to save money by shaving 1 gram from each of his bars. A legitimate bar weighs 100 grams, but there's no way to tell the difference between a legitimate bar and a shaved bar except by weighing. The Puzzle: I have a crusty old coin-operated "speak your weight" machine, and, being a bit cheap, I only want to use it once. How can I tell which Baron has been cheating me with only one weighing?

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,469 interview questions and reports from Internal consultant interviews. Prepare for your interview. Get hired. Love your job.