OpenGenus/cosmos

Create right thread binary tree

Open

#835 aberto em 7 de out. de 2017

Ver no GitHub
 (2 comments) (1 reaction) (0 assignees)C++ (3.724 forks)batch import
Hacktoberfestadd codenew algorithm

Métricas do repositório

Stars
 (13.462 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador