Development Engineer Interview Questions

37,130 development engineer interview questions shared by candidates

11 Answers Given references to roots of two binary trees, how do you short circuit determine whether the sequences of the leaf elements of both the trees are same ? The structure of two BTs may be different. Short circuit : for ex. If the very first leaf element of each tree is different, the algorithm should stop immediately returning false instead of checking all the leaf elements of both trees.
avatar

Software Development Engineer

Interviewed at Amazon

3.5
Feb 17, 2012

11 Answers Given references to roots of two binary trees, how do you short circuit determine whether the sequences of the leaf elements of both the trees are same ? The structure of two BTs may be different. Short circuit : for ex. If the very first leaf element of each tree is different, the algorithm should stop immediately returning false instead of checking all the leaf elements of both trees.

Viewing 981 - 990 interview questions

Glassdoor has 37,130 interview questions and reports from Development engineer interviews. Prepare for your interview. Get hired. Love your job.