Fichas
Valid Number
Fichas del conjunto (1)
- 1Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => trueclass Solution {
public boolean isNumber(String s) {
if(s == null || s.trim().length() == 0) return false;
s = s.trim();
boolean seenNum = false;
boolean seenD = false;
boolean seenE = false;
for(int i = 0; i
Información
- Descripción
- Fichas sobre Valid Number, creado por Suhas S el 23/03/2018.
- Creado por
- Suhas S
- Visitas
- 0
- Valoración