EPIJudge icon indicating copy to clipboard operation
EPIJudge copied to clipboard

Add more test cases about string_to_int and updated the python solution.

Open qudongfang opened this issue 5 years ago • 2 comments

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 avatar Mar 02 '19 14:03 qudongfang

@qudongfang This makes sense to me. @adnanaziz @tsunghsienlee What's your opinion?

metopa avatar Aug 19 '19 16:08 metopa

@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++).

tsunghsienlee avatar Nov 10 '19 18:11 tsunghsienlee