Software Engineer Software Developer Interview Questions

467,049 software engineer software developer 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

See Interview Questions for Similar Jobs

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