From 4c1c1d4842c33c78baf0f827ea29199a1cea4dd2 Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Wed, 6 Nov 2024 21:05:21 +0000 Subject: [PATCH] Update cv6/a_station.c --- cv6/a_station.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/cv6/a_station.c b/cv6/a_station.c index 8de56f6..e36bfd4 100644 --- a/cv6/a_station.c +++ b/cv6/a_station.c @@ -16,22 +16,15 @@ int select_track(struct station* station, const char* target) char t=0; while(target[i]!=0) { - t+=target[i]; // або інша хеш функція + t+=target[i]; } if(t<0) {t=-t;} - i=t%10; //інд в хеш таб + i=t%10; - // if(station->tracks[i]==NULL) - // { - // ++ - // } - // else - // { - // оновимо - // } - //return ???; - return i;//target[0]%10; + + + return i; } void add_target_capacity(struct station* station,const char* target, int capacity)