Computer Technology Interview Questions

1,134 computer technology 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 11 - 20 interview questions

Glassdoor has 1,134 interview questions and reports from Computer technology interviews. Prepare for your interview. Get hired. Love your job.