Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. 10
  2. / \
  3. 8 20
  4. \ \
  5. 4 40
  6. / \ /
  7. 3 6 35
  8. /
  9. 5
  10.  
  11. 6 -> came from 5, coming from left, but 6 hasn't got right so go up
  12. 4 -> came from 6, coming from right, so go up
  13. 8 -> came from 4, coming from right, so go up
  14. 10 -> nor coming right, and 10 has got right, so make a right turn
  15. 20 -> not a leaf, hasn't got left go right
  16. 40 -> not a leaf, has got left go left
  17. 35 -> leaf so this is next leaf.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement