Skip to content

Commit 1b6ddcc

Browse files
authored
All possible codes that an integer string can generate
1 parent 54d10c9 commit 1b6ddcc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

14.Backtracking/alphacode.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ void solve(string &input, string &t, int i)
2424
cout << t << endl;
2525
return;
2626
}
27-
27+
28+
if(input[i] == '0')
29+
return;
30+
2831
int a = input[i] - '0';
2932
if (input[i] <= '9')
3033
{

0 commit comments

Comments
 (0)