OpenGenus/cosmos

Create right thread binary tree

Open

#835 geöffnet am 7. Okt. 2017

Auf GitHub ansehen
 (2 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (3.724 Forks)batch import
Hacktoberfestadd codenew algorithm

Repository-Metriken

Stars
 (13.462 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

In this the right ptr of leaf node points to it's inorder predecessor and the rightmost leaf of the right sub-tree from the root will have both left and right ptrs as NULL Thus this eliminates the overhead of building a stack, since traversal can be done via loop, instead of recursion.

Contributor Guide