@@ -0,0 +1,1265 @@
+// Validate if a given string is numeric.%0A%0A// Some examples:%0A// %220%22 =%3E true%0A// %22 0.1 %22 =%3E true%0A// %22abc%22 =%3E false%0A// %221 a%22 =%3E false%0A// %222e10%22 =%3E true%0A// Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one.%0A%0A%0Apublic class Solution %7B%0A    public boolean isNumber(String s) %7B%0A        // skip white spaces first.%0A        s = s.trim();%0A        if(s.equals(%22%22))%7B%0A        %09return false;%0A        %7D%0A%0A        boolean num = false;%0A        boolean dot = false;%0A        boolean exp = false;%0A        // boolean sign = false;%0A%0A        int start = 0;%0A        int end = s.length() - 1;%0A%0A        if(s.charAt(start) == '+' %7C%7C s.charAt(start) == '-') start++;%0A%0A        while(start %3C= end )%7B%0A        %09char c = s.charAt(start);%0A%0A        %09if(c == '.')%7B%0A        %09%09if(exp %7C%7C dot) return false;%0A        %09%09dot = true;%0A        %09%7Delse if( c == 'e')%7B%0A        %09%09if(exp %7C%7C num == false) return false;%0A        %09%09exp = true;%0A        %09%09num = false;%0A        %09%7Delse if( c %3E= '0' && c %3C= '9')%7B%0A        %09%09num = true;%0A        %09%7Delse if (c == '+' %7C%7C c == '-')%7B%0A        %09%09if (s.charAt(start - 1) != 'e' ) return false;%0A        %09%7Delse %7B%0A        %09%09return false;%0A        %09%7D%0A%0A        %09start++;%0A        %7D%0A%0A        return num;%0A    %7D%0A%7D%09

add valid number solution, too many cases, referd solutions online