employer cover photo
employer logo

VMware Interview Question

Write a function that takes a binary tree as input, and have it perform in order traversal.

Interview Answer

Anonymous

Mar 10, 2011

void inOrder(node* aNode) { if(aNode->iLeft) { inOrder(aNode->iLeft); } cout iRight) { inOrder(aNode->iRight); } }

1