As seen here, a binary tree has a left pointer and a right pointer for each node. Doesn’t that make it a doubly linked list?
And what difference or similarity do they have if any?
As seen here, a binary tree has a left pointer and a right pointer for each node. Doesn’t that make it a doubly linked list?
And what difference or similarity do they have if any?
in doubly linked list you can travels in both direction from starting to the end and also from end to a starting
but in a binary tree you can only move in the downward direction
from the leaf node you cannot go to the root node
it so you have to just make some implementation so that you can also move from the last node to the first order and first noted the last node
So what you have to do
you have to point right of first node to the second node and second node’s left point to the first node