Implement detection of largest increasing subsequence
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 29 Feb 2024 16:25:47 +0000 (17:25 +0100)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 29 Feb 2024 16:25:47 +0000 (17:25 +0100)
commitd8bb6137b9335369903554c862660e84c285faa7
tree53187e1bb5c0ef670abeaa45c08936b12558d9dd
parent340bfab899eb7b70252829aaf9ab9be053229249
Implement detection of largest increasing subsequence

This lowers the number of operations needed for sorting.
We can leave an increasing subsequence inside A because
the sorting algorithm before this commit just builded
incresing sequence anyway.
Leaving a number in stack A costs just one rotate, while
pushing it to B costs at least an additional
push back to A plus probably a bunch of rotates over it
while trying to push other entries back to A.
Makefile
src/checker.h
src/circular_lis.c [new file with mode: 0644]
src/helpers.c
src/push.c
src/stacks_mem.c