Intern Interview Questions

248,932 intern interview questions shared by candidates

Write a function called eval, which takes a string and returns a boolean. This string is allowed 6 different characters: 0, 1, &, |, (, and ). Eval should evaluate the string as a boolean expression, where 0 is false, 1 is true, & is an and, and | is an or. An example string might look like "(0 | (1 | 0)) & (1 & ((1 | 0) & 0))"
avatar

Software Engineer Intern

Interviewed at Dropbox

3.8
Nov 13, 2012

Write a function called eval, which takes a string and returns a boolean. This string is allowed 6 different characters: 0, 1, &, |, (, and ). Eval should evaluate the string as a boolean expression, where 0 is false, 1 is true, & is an and, and | is an or. An example string might look like "(0 | (1 | 0)) & (1 & ((1 | 0) & 0))"

You got some baby bottle samples. You would like to know the max height you can drop it without breaking the bottle. Let set the unit as 1 foot. And the highest height you can reach is at N feet. So how would you find the (max) safe height?
avatar

Software Development Engineer Intern

Interviewed at Amazon

3.5
Jan 28, 2012

You got some baby bottle samples. You would like to know the max height you can drop it without breaking the bottle. Let set the unit as 1 foot. And the highest height you can reach is at N feet. So how would you find the (max) safe height?

Viewing 341 - 350 interview questions

Glassdoor has 248,932 interview questions and reports from Intern interviews. Prepare for your interview. Get hired. Love your job.