Tree vs Graph Structures

Discussions center on whether a featured data structure or system is a tree, DAG, or graph, with many commenters arguing it's reinventing trees or advocating for traditional tree structures over more complex alternatives.

📉 Falling 0.5x Programming Languages
3,250
Comments
20
Years Active
5
Top Authors
#1859
Topic ID

Activity Over Time

2007
7
2008
15
2009
49
2010
59
2011
78
2012
74
2013
105
2014
142
2015
181
2016
160
2017
233
2018
194
2019
272
2020
225
2021
304
2022
291
2023
296
2024
274
2025
277
2026
14

Keywords

BFS AI DAG DP TREE DFS github.com tree nodes trees node graph recursive comic nested structures data

Sample Comments

dalacv • Aug 10, 2018 • View on HN

any chance you will implement a tree structure?

momojo • Feb 5, 2025 • View on HN

So its not tree based? Is it a graph traversal of sorts?

meindnoch • Jun 6, 2025 • View on HN

It's not a tree, it's a DAG.

Klonoar • Oct 19, 2024 • View on HN

Tree has been used for this kind of thing for decades now.

michaelt • Apr 25, 2024 • View on HN

The traditional task is "doing things with tree data structures"

ruslan_talpa • Mar 26, 2017 • View on HN

it's not about traversing trees, it's about "returning" trees, there is a difference :)

sushid • Nov 16, 2017 • View on HN

It's an easy way to check if you can think recursively/are familiar with a btree.

topazas • Apr 22, 2020 • View on HN

can this be used with large graphs, or particularly tree structures?

klyburke • Nov 16, 2019 • View on HN

So much effort to re-invent a tree.

hyt7u • Dec 7, 2014 • View on HN

Ah, great, thanks. I wasn't thinking about modifications to the tree.