-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path8_StringToInteger.py
More file actions
31 lines (21 loc) · 928 Bytes
/
Copy path8_StringToInteger.py
File metadata and controls
31 lines (21 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# coding: utf8
"""
题目链接: https://leetcode.com/problems/string-to-integer-atoi/description.
题目描述:
Implement atoi to convert a string to an integer.
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.
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.
Update (2015-02-10):
The signature of the C++ function had been updated. If you still see your function signature accepts a const char *
argument, please click the reload button to reset your code definition.
spoilers alert... click to show requirements for atoi.
"""
class Solution(object):
def myAtoi(self, str):
"""
:type str: str
:rtype: int
"""
pass