Software Developer Engineer Interview Questions

466,989 software developer engineer 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))"

First Question: Print all combinations from dictionary which will result in number N Input Dictionary { “flag”:4.5, “temp”:2 ,”foo”:9} N : 11 Output: “Flag”*2 + “temp”*1 “Foo”*1+”temp”*1 Second Question: Return list of root-to-leaf sum (in left to right) from given tree Input: 1 / \ 2 3 / \ 4 5 Output: [7,8,4]
avatar

Software Engineer

Interviewed at Meta

3.5
May 20, 2021

First Question: Print all combinations from dictionary which will result in number N Input Dictionary { “flag”:4.5, “temp”:2 ,”foo”:9} N : 11 Output: “Flag”*2 + “temp”*1 “Foo”*1+”temp”*1 Second Question: Return list of root-to-leaf sum (in left to right) from given tree Input: 1 / \ 2 3 / \ 4 5 Output: [7,8,4]

Viewing 1431 - 1440 interview questions

Glassdoor has 466,989 interview questions and reports from Software developer engineer interviews. Prepare for your interview. Get hired. Love your job.