Add dist and change make_dist

This commit is contained in:
AZEN-SGG 2025-05-19 20:33:04 +03:00
parent a5ffe19dd8
commit 50e9bb6d59
31 changed files with 996 additions and 1 deletions

View file

@ -0,0 +1,20 @@
#include "solve_02.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;
}