Amazon Interview Question: Given a binary tree, convert ... | Glassdoor

Interview Question

Software Development Engineer Interview Seattle, WA

Given a binary tree, convert it into a doubly circular

  linked list. The structure of the tree was given by the interviewer and also the structure of the doubly circular linked list.
binary tree linked list

Interview Answer

2 Answers


The elements in the DCLL were in the same order as the inorder traversal of the binary tree. So if you know how to code the inorder traversal of a tree in any language the question won't be that hard.

Interview Candidate on Jun 18, 2012

The following blog discussed how to convert a binary search tree into a double linked list:

Harry on Feb 17, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.