Answers for "minimum and maximum values in a bst java"

0

minimum and maximum values in a bst java

int max(Node t) { 
    	        	if(t == null)
    	        		return 0;
    	            while (t.right != null)  
    	                t = t.right; 
    	             System.out.println(t.data); 
    	            return t.data; 
    	        }
    	        //Node max(Node t) {
    	        	 // if (t.right != null) { 
      	               // return min(t.right);
      	            //} 
      	            //return t;
    	        //}
    	        int min(Node t) {
    	        	if(t == null)
    	        		return 0;
    	            while (t.left != null)  
    	                t = t.left; 
    	             System.out.println(t.data); 
    	            return t.data; 
    	        }
    	        //Node min(Node t) { 
    	          //  if (t.left != null) { 
    	            //    return min(t.left);
    	            //} 
    	            //return t; 
    	        //}
Posted by: Guest on December-01-2020

Code answers related to "minimum and maximum values in a bst java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language