Tree In-Order Traversal to Next Node

Given a node in a binary tree, implement the algorithm for finding its next in-order node in the containing tree.

Problem Statement

Given a node in a binary tree, implement the algorithm for finding its next in-order node in the containing tree.

References

Paul from Adify

Recommended reading

  • Circular Linked List Detection

    A linked list is given. Write an algorithm that detects whether it's a singly linked list or a circularly linked list.

  • Find the middle node of a Linked List

    Given a Singly Linked List, write an algorithm to find the middle node. You may not use more than one loop of any kind.

  • Graph Cycle Detection

    You have a directed connected graph. Write an algorithm that detects any cycle, if one exists, and returns a list of its nodes.

  • Breadth First Tree Traversal

    Write an algorithm that takes a tree data structure and writes out all the elements in a breadth-first traversal order.

Author
Amin Ariana
Published
January 2011