demo-preorder-stack - 1 14 14 84 43 13 16 33 97 64 99 72 53...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 14 14 84 43 13 16 33 97 64 99 72 53 Preorder Traversal with a Stack Push the root onto the stack. While the stack is not empty ■ pop the stack and visit it ■ push its two children 14 84 13 53 06 99 72 43 33 64 97 51 25 Stack 2 84 43 14 84 43 13 16 33 97 64 99 72 53 Preorder Traversal with a Stack Push the root onto the stack. While the stack is not empty ■ pop the stack and visit it ■ push its two children 14 84 13 53 06 99 72 43 33 64 97 51 25 Stack 14 3 13 16 43 14 84 43 13 16 33 97 64 99 72 53 Preorder Traversal with a Stack Push the root onto the stack. While the stack is not empty ■ pop the stack and visit it ■ push its two children 14 84 13 53 06 99 72 43 33 64 97 51 25 Stack 4 53 16 43 14 84 43 13 16 33 97 64 99 72 53 Preorder Traversal with a Stack Push the root onto the stack. While the stack is not empty ■ pop the stack and visit it ■ push its two children 14 84 13 53 06 99 72 43 33 64 97 51 25 Stack 13 5...
View Full Document

This note was uploaded on 06/25/2009 for the course MATH MAT 400 taught by Professor Jamespotvein during the Fall '08 term at University of Toronto.

Page1 / 13

demo-preorder-stack - 1 14 14 84 43 13 16 33 97 64 99 72 53...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online