We all know the structure of a binary tree:
struct binary_tree {
binary_tree *parent;
int data;
binary_tree *left;
binary_tree *right;
};
So a doubly linked list has the following structure:
struct linked_list {
linked_list *prev;
int data;
linked_list *next;
};
But a binary tree can also be manipulated like this:
struct my_linked_list {
my_linked_list *prev;
int data;
my_linked_list *next0;
my_linked_list *next1;
} binary_tree;
By that, I have "proven" that binary tree shares a similarity to doubly linked list. (with the addition of another next element)
So my question is here: Is binary tree really a vertically-descending graph, or just an extension to the linked list, that can be drawn horizontally?
I know this is a kind of stupid and meaningless question but it was confusing me for years and years. I am just an apprentice to the computer science...