这是indexloc提供的服务,不要输入任何密码
Skip to content

Dirkster99/TreeLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build status

TreeLib

This projects produces a a .Net Standard Library with Generic methods to travere k-nary trees (k >=1) in any order required.

The project in this repository contains a demo console project to demo its usage.

Suported Generic Traversal Methods

Breadth First

Level Order

See TreeLib.BreadthFirst.Traverse.LevelOrder implementation for:

  • trees with 1 root (expects <T> root as parameter)
  • trees with multiple root node (expects IEnumerable<T> root as parameter)

Depth First

PreOrder

See TreeLib.BreadthFirst.Traverse.PreOrder implementation for:

  • trees with 1 root (expects <T> root as parameter)
  • trees with multiple root node (expects IEnumerable<T> root as parameter)

Postorder

See TreeLib.BreadthFirst.Traverse.Postorder implementation for:

  • trees with 1 root (expects <T> root as parameter)
  • trees with multiple root node (expects IEnumerable<T> root as parameter)

Tip

  • Read about Generic Tree and Linked List Traversal in C# to understand the usefullnes of Generic traversal methods.

  • Watch the Binary tree traversal: Preorder, Inorder, Postorder video to better understand what is what (and why these Traversal Order Names make some sense):