Skip to content

Commit

Permalink
fix lgtm error - lexicographic_permutations
Browse files Browse the repository at this point in the history
  • Loading branch information
kvedala committed Jun 28, 2020
1 parent 17c5523 commit 20bab2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions misc/lexicographic_permutations.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 20bab2a

Please sign in to comment.