https://github.com/kathleenwest/treeparentchildtraverserecursion
Tree Algorithm, Recursion, and Printing Example with Folder Parent-Child Relationships. Traverse a tree with recursion.
https://github.com/kathleenwest/treeparentchildtraverserecursion
console-app console-application csharp csharp-code dotnet folder folder-print folder-structure folders parent-child tree tree-algorithms tree-search tree-structure tree-traversal
Last synced: 4 days ago
JSON representation
Tree Algorithm, Recursion, and Printing Example with Folder Parent-Child Relationships. Traverse a tree with recursion.
- Host: GitHub
- URL: https://github.com/kathleenwest/treeparentchildtraverserecursion
- Owner: kathleenwest
- Created: 2023-10-08T19:45:14.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T03:42:00.000Z (almost 2 years ago)
- Last Synced: 2025-03-17T01:21:16.845Z (7 months ago)
- Topics: console-app, console-application, csharp, csharp-code, dotnet, folder, folder-print, folder-structure, folders, parent-child, tree, tree-algorithms, tree-search, tree-structure, tree-traversal
- Language: C#
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tree Algorithm - Parent Child Folder Relationship - Traverse a Tree with Recursion
Tree Algorithm, Recursion, and Printing Example with Folder Parent-Child RelationshipsA simple console application that generates a static list of Folder objects randomly ordered.
The Folder objects have a name (string) and relationship to a parent Folder object by reference.
Top-level folders have a "null" relationship with their parent Folder.
The application then uses a Tree algorithm to recursively navigate the list of folders and "pretty"
print them with tab-delimited formatting based on their level in the hierarchy.
Example:
1
1.1
1.1.1
1.1.2
1.1.3
1.2
1.2.1
1.2.2
1.2.2.1
1.2.2.2
2
2.1