This is not a great leetcode question because it is not clearly defined. This would be fine as a real interview question where you can work out the requirements by asking the interviewer questions but in leetcode you just have to use trial and error by submitting to see if it passes the test cases. So the following cases need to pass: “.1” -> true and “2.” -> true. Also the exponent number can have an optional sign character (+/-).
-
Recent Posts
Recent Comments
Archives
Categories
Meta