Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Node(){
- Node left;
- Node right;
- int x;
- }
- main(){
- public int recursive(Treenode root){
- return (root==null?0:(root.left<root.right?:(root.right:root.left)))+1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement