X331: Same Binary Tree Exercise (Modified)

Given two binary trees, return true if they are identical (they have nodes with the same values, arranged in the same way).
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();

Your Answer:


Practice a different Java exercise


Your feedback will appear here when you check your answer.