Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
witek-formanski committed Oct 26, 2023
1 parent e2f1640 commit 48bf54f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/subsequence.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ int partition(int arr[], int low, int high) {

for (int j = low; j <= high; j++) {
if (arr[j] < pivot) {
swap(arr[i], arr[j]);
swap(&arr[i], &arr[j]);
i++;
}
}
swap(arr[i + 1], arr[high]);
swap(&arr[i + 1], &arr[high]);
return (i + 1);
}

Expand Down Expand Up @@ -66,5 +66,5 @@ int main() {
if(!scanf("%d", &b[i])) printf("invalid value");
}

printf(is_subsequence(a, size_a, b, size_b));
printf("%d", is_subsequence(a, size_a, b, size_b));
}

0 comments on commit 48bf54f

Please sign in to comment.