Hello.
I started learning trees on my algorithm course and I really stuck and confused on that the root of the tree isn't the first one just, it may be any other element on the tree..how is that correct? maybe I should look on the tree in another approach/aspect/view? it's really obvious and clear that the first node is the tree .. so how could be another elements on the tree also a root?! much appreciated in advance for clarification about "root" in aspect of computer science and algorithms.
should the root of the tree be just the first one? it wouldn't be acceptable that root for instance in the second level .. because it would have neighbor in the second subree and it's known that root is a root doesn't have neighbor or parents ..
here's a link for a binary tree "general tree":
https://www.google.com/search?q=Tre...AUIECgB&biw=1242&bih=568#imgrc=bCdgtXzvQdQwqM:
I started learning trees on my algorithm course and I really stuck and confused on that the root of the tree isn't the first one just, it may be any other element on the tree..how is that correct? maybe I should look on the tree in another approach/aspect/view? it's really obvious and clear that the first node is the tree .. so how could be another elements on the tree also a root?! much appreciated in advance for clarification about "root" in aspect of computer science and algorithms.
should the root of the tree be just the first one? it wouldn't be acceptable that root for instance in the second level .. because it would have neighbor in the second subree and it's known that root is a root doesn't have neighbor or parents ..
here's a link for a binary tree "general tree":
https://www.google.com/search?q=Tre...AUIECgB&biw=1242&bih=568#imgrc=bCdgtXzvQdQwqM: