>  Term: zipper
zipper

A data structure equivalent to a binary tree that is "opened" so that some node is accessible. It consists of a pair: the current node, along with information to reconstruct the tree. Reconstruction information is called the path or context. A move-to-left-child operation returns the left subtree, along with a new path, which has (i) a Left value, (ii) the current node, (iii) the right subtree, and (iv) any previous path. A similar operation moves to the right child. A move-up operation returns a tree rebuilt from the path information and the current node, along with the previous path.

0 0

작성자

  • GeorgeV
  •  (Gold) 1123 포인트
  • 100% positive feedback
© 2024 CSOFT International, Ltd.