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))"
Intern Interview Questions
248,932 intern interview questions shared by candidates
How would you store the configuration of a chess board at any point in the game?
Sort a binary tree into an array.
What motivates you?
NDA
1) Debug some code and take logic test 2) Perform coding challenge 3) Show general knowledge of software development, code something, talk about interests
Find duplicate elements in two lists
Write a function where, given an index, you return the Fibonacci number at that index.
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
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