Min Li's Note
KVM,QEMU, X86 virtualization
Pages
Home
Collection
About
Monday, September 29, 2014
Binary Tree Inorder Traversal
Problem
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Idea
Use stack. Push left child to stack &nbsp > &nbsp push_back(parent->val) to result &nbsp > &nbsp push right child to stack.
Solution
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment