Top "Tree" questions

A tree is a widely-used data structure that emulates a hierarchical tree-like structure with a set of linked nodes.

Why Java Collection Framework doesn't contain Tree and Graph

I am familiar with Java Collection Framework which contains basic interfaces: Collection and Map. I am wondering why the Framework …

java collections graph tree
Creating a JSON Tree from a string hierarchy

Given these 4 variables, var el1 = {name:'ronaldo', team: 'europe/spain/realmadrid'} var el2 = {name:'messi', team: 'europe/spain/barcelona'} var …

javascript json tree hierarchy
What is the total number of nodes in a full k-ary tree, in terms of the number of leaves?

I am doing a unique form of Huffman encoding, and am constructing a k-ary (in this particular case, 3-ary) tree …

math data-structures encoding character-encoding tree
How to render a tree in Twig

I would like to render a tree with an undetermined depth (children of children of children, etc.). I need to …

loops recursion tree twig
How to determine the height of a recursion tree from a recurrence relation?

How does one go about determining the height of a recursion tree, built when dealing with recurrence run-times? How does …

recursion tree computer-science recurrence proof
How to represent a tree like structure in a db

I'm starting a project and I'm in the designing phase: I.e., I haven't decided yet on which db framework …

database data-structures tree hierarchical-data
Is Pre-Order traversal on a binary tree same as Depth First Search?

It seems to me like Pre-order traversal and DFS are same as in both the cases we traverse till the …

algorithm tree binary-tree depth-first-search preorder
Calculate minimal operations to make two tree structures identical

This is more of a CS question, but an interesting one : Let's say we have 2 tree structures with more or …

algorithm tree comparison diff computer-science
PHP - How to build tree structure list?

So, my problem is, that I want to build a tree of these 2 tables: Parent table: +-------+---------------+ | pr_id | …

php recursion tree structure
Using self.xxxx as a default parameter - Python

I'm trying to simplify one of my homework problems and make the code a little better. What I'm working with …

python object recursion tree