fix lgtm error - lexicographic_permutations

41e2711683/files/misc/lexicographic_permutations.c (x2d1d13a31e62af9e):1
This commit is contained in:
Krishna Vedala 2020-06-28 15:46:42 -04:00
parent 17c5523129
commit 20bab2a5ae
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7
1 changed files with 3 additions and 2 deletions

View File

@ -50,8 +50,9 @@ void PrintSortedPermutations(char *str)
int main()
{
int n; // size of string
scanf("%d\n", &n);
unsigned int n; // size of string
scanf("%u\n", &n);
char *str = (char *)malloc(n * sizeof(char));
scanf("%s", str);
PrintSortedPermutations(str);