2nd_Sem_Bogachev/2025.05.23/02Ex/solve.c
2025-05-18 19:39:04 +03:00

20 lines
281 B
C

#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;
}