Microsoft Interview Question: I was asked to create a funct... | Glassdoor

Interview Question

Software Development Engineer Interview

I was asked to create a function to check if a binary tree

  is sorted.

Interview Answer

1 Answer


Created an in-order tree traversal that retains the last node visited. If the last node is greater than the current node, the tree is not sorted.

Interview Candidate on May 4, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.