全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Traversal, preorder, inorder, postorder, breadth-first order?

又称: traversal · preorder · inorder · postorder · breadth-first order

Definition 25.5 High School Computer Science · 第 25 章 — Trees and Binary Search Trees

A traversal of a tree visits each node once. In preorder, a node is visited before its left and right subtrees; in inorder, between them; in postorder, after them. In breadth-first order, nodes are visited level by level, from the root down, from left to right in each level.

The expression (3 + 4) × (5 - 2) as a tree, with its four traversals. In postorder each operator comes after its operands; the values computed at each node are written beside it.
The expression (3+4)×(5−2)(3 + 4) \times (5 - 2) as a tree, with its four traversals. In postorder each operator comes after its operands; the values computed at each node are written beside it.
在原文中阅读 →