class Solution { public: bool checkNum(char c) { if(c >= '0' && c <= '9') return true; if(c == '+' || c == '-') return true; return false; } int StrToInt(string str) { string s; int flag = 1; ...