Task 2 is done

This commit is contained in:
AZEN-SGG 2025-05-18 19:39:04 +03:00
parent 23eff9e484
commit cd08e7ba3a
20 changed files with 453 additions and 0 deletions

20
2025.05.23/02Ex/solve.c Normal file
View file

@ -0,0 +1,20 @@
#include "solve.h"
#include "node.h"
#include <string.h>
int t2_solve (node *head)
{
char *last = head->string;
int count = 1;
for (head = head->next; head; head = head->next)
{
if (strcmp(head->string, last) > 0)
count++;
last = head->string;
}
return count;
}