EPIJudge
EPIJudge copied to clipboard
Add more test cases about string_to_int and updated the python solution.
string_to_int
should support +
, such as +1
, +321
, which is supported by most std libraries.
int('+321') == int('321') == 321
https://github.com/adnanaziz/EPIJudge/blob/1e03a0c4e3ac033f1814e31c817e3a9889035aa3/epi_judge_python_solutions/string_integer_interconversion.py#L25-L30
@qudongfang This makes sense to me. @adnanaziz @tsunghsienlee What's your opinion?
@qudongfang Agree, I think this makes sense as modern programming languages support this. This matches what this problem asks for (e.g., implementing stoi
in C++).