natural way to realize tree is to use linked structurewhere we represent each node of by position object (see figure awith the following fieldsa reference to the element stored at va link to the parent of vand some kind of collection (for examplea list or arrayto store links to the children of if is the root of tthen the parent field of is null alsowe store reference to the root of and the number of nodes of in internal variables this structure is schematically illustrated in figure