Skip to content

Commit 245a80b

Browse files
refactor 8
1 parent 19dc1a7 commit 245a80b

File tree

1 file changed

+0
-16
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-16
lines changed

src/main/java/com/fishercoder/solutions/_8.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 8. String to Integer (atoi)
5-
*
6-
* Implement atoi to convert a string to an integer.
7-
*
8-
* Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
9-
* Notes: It is intended for this problem to be specified vaguely (ie, no given input specs). You are responsible to gather all the input requirements up front.
10-
*
11-
* Requirements for atoi:
12-
* The function first discards as many whitespace characters as necessary until the first non-whitespace character is found.
13-
* Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value.
14-
* The string can contain additional characters after those that form the integral number, which are ignored and have no effect on the behavior of this function.
15-
* If the first sequence of non-whitespace characters in str is not a valid integral number,
16-
* or if no such sequence exists because either str is empty or it contains only whitespace characters, no conversion is performed.
17-
* If no valid conversion could be performed, a zero value is returned. If the correct value is out of the range of representable values, INT_MAX (2147483647) or INT_MIN (-2147483648) is returned.*/
18-
193
public class _8 {
204

215
public static class Solution1 {

0 commit comments

Comments
 (0)