Commit graph

22 commits

Author SHA1 Message Date
e07bb4eee0
improve linked list insert and merge from O(n) to O(1)
just keeping track of the tail is enough to do that
2024-03-11 12:01:09 +01:00
26f425b811
fix for halved output data - set list head's prev to new tail 2024-03-11 01:36:50 +01:00
685d4db676
current -> tail in zad2 2024-03-11 01:34:25 +01:00
f2f78e0cfa
clearer name 2024-03-11 01:25:10 +01:00
a7d5059475
won't fix anything but for the sake of correctness 2024-03-11 01:22:02 +01:00
5f79936acc
zad3 init 2024-03-11 01:16:49 +01:00
25c4656a51
remove index because it's literally the same as comparisons 2024-03-11 01:02:43 +01:00
73b5777b88
forgot about this 2024-03-11 00:29:38 +01:00
b3953bac3a
whoops 2024-03-10 23:01:12 +01:00
fb400dc168
add linked list searching and the second test 2024-03-10 22:56:05 +01:00
4245731593
zad2 init with merge test 2024-03-10 20:11:25 +01:00
d452a7c5b0
long -> int64_t 2024-03-10 19:41:47 +01:00
ac1d9adc9c
the most important change 2024-03-10 14:22:35 +01:00
34c236ad86
add stack and separate queue and stack tests in main 2024-03-10 14:19:56 +01:00
13bcfc37f6
whoops 2024-03-10 14:14:44 +01:00
761c019407
fix length difference
now making a queue with size n will actually let you store n elements in
it instead of n-1
2024-03-10 14:13:04 +01:00
df960e552c
queue.size -> queue.length 2024-03-10 14:06:03 +01:00
8ef8ad7ddb
fifo -> queue 2024-03-10 14:03:59 +01:00
a877419d69
add queue_free and return a copy of the data to the user 2024-03-10 12:47:38 +01:00
dc368f088a
fix writing to the queue using the same value
the fix was to memcpy the passed pointer to a local one and it works :-)
2024-03-10 01:16:13 +01:00
e58facd03e
whoops 2024-03-10 01:00:49 +01:00
15934c4708
init 2024-03-10 00:45:57 +01:00