The Nth Smallest Element in a Binary Tree in C

Write function that takes a binary tree and efficiently returns the Nth smallest element.

For example, if N=4, and the tree looks like:

    3
   / \
  2   5
 /   / \
1   4   6

The function should return 4.

Got What it Takes? Test Drive Your Solution in C

Your code goes here...

Compile and Run

...output appears here!