What do you think about?


  • 0
    G
    public class Solution {
    	static int lengthOfLongestSubstring(String s) {
            String letters = "qwertyuioplkjhgfdsazxcvbnm";
            int count=0;
            for(int i=0; i<letters.length(); i++)
                {
                    if(s.contains(letters.charAt(i)+""))
                    	count++;
                }
            return count;
        }
    	public static void main(String[] args)
    	{
    		String s="pasdasdfdgwwkew";
    		 System.out.println(lengthOfLongestSubstring(s)); 
    	}
    }

  • -2
    I

    oh my god,how do you think it out? it's perfect


  • 0

    Are you joking? (I really can't tell)
    It's so wrong that it doesn't even get accepted.


  • 0
    I

    sorry,i havn't analysis before commenting...


Log in to reply
 

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