Nasdaq Interview Question: What's faster a Binary Tree o... | Glassdoor.co.in

Interview Question

Software Engineering Interview(Student Candidate) Philadelphia, PA (US)

What's faster a Binary Tree or Hash map? - Wouldn't say it

  was most difficult but it was unexpected
Tags:
technical, analytical, time complexity
Answer

Interview Answer

1 Answer

0

Do we care about the data type? Hash maps are faster than trees. O(1) but O(n) worst case. Where binary search trees are O(log N) average and O(n) worst case.

Interview Candidate on 12-Dec-2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.