intellij idea - incompatible types: java.lang.Object cannot be converted -
you need use stack<tree> rather stack in fifth line of preoderiter. tells compiler stack stores trees (rather default object) when stack.pop() (see line underlined in red) knows result tree , not object.
Comments
Post a Comment