タグ

binary-search-treeとbinary-treeに関するnabinnoのブックマーク (2)

  • 二分木 - Wikipedia

    簡単な二分木。大きさ9、深さ3、根は値2を持つ 二分木(にぶんぎ)は、データ構造の1つである。二進木(にしんぎ)やバイナリツリー(英: binary tree)とも呼ばれ、根付き木構造の中で、全てのノード(節点 node)が持つ子の数が高々2であるものをいう。典型的には2つの子はそれぞれ「左」「右」と呼ばれる。 たとえば、二分探索や二分ヒープを実装するために使われる。 以後、括弧の中は英語表記。 用語[編集] 親から子へ有向線分(辺、エッジ edge)が引かれる。子を持たないノードを葉(リーフ leaf)ないし外部ノード (external node) と呼ぶ。葉でないノードを内部ノード (internal node) と呼ぶ。あるノードの「深さ」(depth) はルート(root 「根」にあたるノード)からそのノードまでにたどる経路(パス path)の長さ(経路の種類ではなく、ノード-ノ

    二分木 - Wikipedia
  • Binary tree - Wikipedia

    A labeled binary tree of size 9 (the number of nodes in the tree) and height 3 (the height of a tree defined as the number of edges or links from the top-most or root node to the farthest leaf node), with a root node whose value is 1. The above tree is unbalanced and not sorted. In computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as

    Binary tree - Wikipedia
  • 1