X325: Binary Tree Increment By One Exercise (Modified)

Write a recursive function that increments by one the value for every node in the binary tree pointed at by root, then returns the modified tree. Assume that nodes store integer values.
Here are methods that you can use on the BinNode objects:
   interface BinNode {
      public int value();
      public void setValue(int v);
      public BinNode left();
      public BinNode right();
      public boolean isLeaf();
   }

Reset

Practice a different Java exercise