Myntra Interview Question
Software Engineer / DevelopersCountry: -
Interview Type: Phone Interview
<pre lang="" line="1" title="CodeMonkey41229" class="run-this">void PreOrder(node* root) {
Stack s;
while(true) {
while(root) {
print(root->data);
push(&s,root);
root = root->left;
}
if(isempty(&s)) break;
else {
root = pop(&s);
root = root->right;
}
}
}
</pre><pre title="CodeMonkey41229" input="yes">
</pre>
- Vir Pratap Uttam May 04, 2015