Added last three homeworks

This commit is contained in:
AZEN-SGG 2025-03-02 14:38:34 +03:00
parent f7b2367bc4
commit 0e3d948c9f
363 changed files with 18214 additions and 0 deletions

16
2025.02.21/1Ex/solve.c Normal file
View file

@ -0,0 +1,16 @@
#include "solve.h"
int t1_solve(char ** a, int n, char *s) {
int i, j;
for (i = 0, j = 0; i < n; ++i) {
if (strcmp(a[i], s) >= 0)
{
if (i != j) a[j] = a[i];
j++;
} else free(a[i]);
}
for (i = j; i < n; ++i) a[i] = 0;
return j;
}