No Loop easy solution in Java


  • 0
    E
            String str[]=s.split(" ");
            int n=str.length;
            if(n==0){
            	return 0;
            }
            else{
                return str[n-1].length();
            }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.