All Projects → c05mic → Genericn Arytree

c05mic / Genericn Arytree

Simple Generic N-ary Tree implementation in Java, with many utility methods.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Genericn Arytree

Flix
iOS reusable form library in Swift.
Stars: ✭ 725 (+1712.5%)
Mutual labels:  generics
Metric Parser
📜 AST-based advanced mathematical parser written by Typescript.
Stars: ✭ 26 (-35%)
Mutual labels:  tree
Genericdatasource
Generic Data Source in Swift.
Stars: ✭ 33 (-17.5%)
Mutual labels:  generics
Pie
🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance.
Stars: ✭ 788 (+1870%)
Mutual labels:  generics
Tree layout
Algorithms to layout trees in a pretty manner.
Stars: ✭ 24 (-40%)
Mutual labels:  tree
React Native Pathjs Charts
Android and iOS charts based on react-native-svg and paths-js
Stars: ✭ 877 (+2092.5%)
Mutual labels:  tree
React Ui Tree
React tree component with drag & drop
Stars: ✭ 720 (+1700%)
Mutual labels:  tree
Deepdiff
Deep Difference and search of any Python object/data.
Stars: ✭ 985 (+2362.5%)
Mutual labels:  tree
Time
Type-safe time calculations in Kotlin, powered by generics.
Stars: ✭ 939 (+2247.5%)
Mutual labels:  generics
Algorithms
Study cases for Algorithms and Data Structures.
Stars: ✭ 32 (-20%)
Mutual labels:  tree
Gtools
gevent tools
Stars: ✭ 7 (-82.5%)
Mutual labels:  tree
Christmas Tree
ASCII christmas-tree with animations for 256 colored terminals
Stars: ✭ 23 (-42.5%)
Mutual labels:  tree
Tree printer
A Java class for printing binary trees as ASCII text
Stars: ✭ 20 (-50%)
Mutual labels:  tree
Vue.d3.tree
Vue component to display tree based on D3.js layout.
Stars: ✭ 726 (+1715%)
Mutual labels:  tree
Jqtree
Tree widget for jQuery
Stars: ✭ 977 (+2342.5%)
Mutual labels:  tree
Coc Explorer
📁 Explorer for coc.nvim
Stars: ✭ 722 (+1705%)
Mutual labels:  tree
Goderive
Code Generation for Functional Programming, Concurrency and Generics in Golang
Stars: ✭ 848 (+2020%)
Mutual labels:  generics
Vue Treeselect
A Tree Select Plugin For Vue2.0+
Stars: ✭ 40 (+0%)
Mutual labels:  tree
Cracking The Coding Interview
Solutions for Cracking the Coding Interview - 6th Edition
Stars: ✭ 35 (-12.5%)
Mutual labels:  tree
Js Tree List
Convert list to tree, managing a tree and its nodes.
Stars: ✭ 30 (-25%)
Mutual labels:  tree

Simple Generic N-ary Tree implementation in Java

Utility methods:

  1. To check if a node exists in the tree.
  2. To find the total number of nodes in the tree
  3. To find the total number of descendants of any node in the tree.
  4. To get all the paths from the root to all the leaves as a List.
  5. To get all longest path from the root to any leaf.
  6. To get the pre-order/post-order traversal path as a List.

Example Usage:

// Create a new Integer type node
Node<Integer> root = new Node<Integer>(1);
 
// Add a child
root.addChild(new Node<Integer>(2));
 
// Create a tree, providing the root node
Tree<Integer> tree = new Tree<Integer>(root);
 
// Get the pre-order traversal
List<Node<Integer>> preOrder = tree.getPreOrderTraversal();

Download:

Maven:

<dependency>
    <groupId>com.c05mic.generictree</groupId>
    <artifactId>GenericN-aryTree</artifactId>
    <version>1.1.1</version>
</dependency>

Gradle:

repositories {
  mavenCentral() // jcenter() works as well because it pulls from Maven Central
}

dependencies {
  compile 'com.c05mic.generictree:GenericN-aryTree:1.1.1'
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].