6 Replies Latest reply: Oct 5, 2011 6:07 PM by 891631 RSS

    N-level tree

    user3214090
      Hi,

      I have need to create a non-binary tree structure whose max depth needs to be restricted at all times. So, if I needed the depth to be restricted to say 3 and I tried to insert a node
      at the leaf that's already at depth=3, it should fail.

      Is there an algorithm that works on similar lines? So in my example, the algorithm should basically help me keep the tree at 3 levels at all times.

      Thanks in advance

      PJ

      Edited by: user3214090 on Mar 9, 2011 1:19 PM