LeetCode-8 字符串转换整数(atoi)

  class Solution { public: long myAtoi(string str) { //面试题中经常会考到的 int len = str.size(); int first = false; int flag = 0; long result = 0; if (len == 0) return 0; int i; for (i = 0; i<len;++i
相关文章
相关标签/搜索