Computer Engineer Interview Questions

5,373 computer engineer interview questions shared by candidates

You are given a Binary Search Tree of ints with duplicate entries. You are guaranteed that if an element has a duplicate entry, it is in the right subtree of that element. Write a function to count the total number of duplicates. (note, if a tree contains the same element two times, the count of duplicates is 1, not 2)
avatar

Computer Science Intern

Interviewed at Amazon

3.5
Jan 18, 2012

You are given a Binary Search Tree of ints with duplicate entries. You are guaranteed that if an element has a duplicate entry, it is in the right subtree of that element. Write a function to count the total number of duplicates. (note, if a tree contains the same element two times, the count of duplicates is 1, not 2)

Viewing 41 - 50 interview questions

Glassdoor has 5,373 interview questions and reports from Computer engineer interviews. Prepare for your interview. Get hired. Love your job.