]> git.dkaiser.de - 42/push_swap.git/log
42/push_swap.git
19 months agoMerge pull request #6 from dpu-kaiser/add_2op_optimization master
Dominik Kaiser [Wed, 17 Apr 2024 08:01:51 +0000 (10:01 +0200)]
Merge pull request #6 from dpu-kaiser/add_2op_optimization

Add optimization for double stack ops

19 months agoMerge branch 'master' into add_2op_optimization
Dominik Kaiser [Wed, 17 Apr 2024 08:00:27 +0000 (10:00 +0200)]
Merge branch 'master' into add_2op_optimization

19 months agoAdd optimization for double stack ops
Dominik Kaiser [Wed, 17 Apr 2024 07:53:13 +0000 (09:53 +0200)]
Add optimization for double stack ops

Now RA and RB will be optimized to RR

19 months agoMerge pull request #4 from dpu-kaiser/refactor-cmd_optimization
Dominik Kaiser [Tue, 16 Apr 2024 16:20:57 +0000 (18:20 +0200)]
Merge pull request #4 from dpu-kaiser/refactor-cmd_optimization

Refactor cmd_optimization

19 months agoRefactor cmd_optimization
Dominik Kaiser [Tue, 16 Apr 2024 16:10:54 +0000 (18:10 +0200)]
Refactor cmd_optimization

19 months agoMerge pull request #2 from dpu-kaiser/simplify-args
Dominik Kaiser [Tue, 16 Apr 2024 07:38:38 +0000 (09:38 +0200)]
Merge pull request #2 from dpu-kaiser/simplify-args

Simplify args

19 months agoAdjust main to correctly use and free data
Dominik Kaiser [Tue, 16 Apr 2024 07:36:40 +0000 (09:36 +0200)]
Adjust main to correctly use and free data

19 months agoFix syntax error
Dominik Kaiser [Tue, 16 Apr 2024 07:29:39 +0000 (09:29 +0200)]
Fix syntax error

19 months agoSimplify arguments into t_psdata
Dominik Kaiser [Tue, 16 Apr 2024 07:28:12 +0000 (09:28 +0200)]
Simplify arguments into t_psdata

19 months agoRevert "Add inefficient quicksort? algorithm"
Dominik Kaiser [Mon, 15 Apr 2024 22:13:14 +0000 (00:13 +0200)]
Revert "Add inefficient quicksort? algorithm"

This reverts commit f421b2dcf9a5d12655e48f4a06f35f17e785fb0f.

19 months agoAdd inefficient quicksort? algorithm
Dominik Kaiser [Mon, 15 Apr 2024 22:01:47 +0000 (00:01 +0200)]
Add inefficient quicksort? algorithm

This algorithm is based on quicksort but probably not really in its
spirit. It is extremely inefficient but could maybe fixed with some
post-optimization.

19 months agoMerge pull request #1 from dpu-kaiser/rotating_arrays
Dominik Kaiser [Mon, 15 Apr 2024 19:56:02 +0000 (21:56 +0200)]
Merge pull request #1 from dpu-kaiser/rotating_arrays

Rotating arrays

19 months agoFix push bug
Dominik Kaiser [Mon, 15 Apr 2024 19:55:06 +0000 (21:55 +0200)]
Fix push bug

19 months agoChange stacks from linked lists to rotating arrays
Dominik Kaiser [Mon, 15 Apr 2024 15:54:43 +0000 (17:54 +0200)]
Change stacks from linked lists to rotating arrays

19 months agoMake Makefile linux compatible
Dominik Kaiser [Mon, 15 Apr 2024 10:13:10 +0000 (12:13 +0200)]
Make Makefile linux compatible

19 months agoAdd error handling for stack optimization
Dominik Kaiser [Mon, 15 Apr 2024 10:04:00 +0000 (12:04 +0200)]
Add error handling for stack optimization

19 months agoCreate function for step-by-step sorting
Dominik Kaiser [Sat, 13 Apr 2024 18:01:38 +0000 (20:01 +0200)]
Create function for step-by-step sorting

19 months agoAdd cmd optimization
Dominik Kaiser [Sat, 13 Apr 2024 15:49:06 +0000 (17:49 +0200)]
Add cmd optimization

After the sorting algorithm was executed remove unneccessary commands.

19 months agoChange optimization to stack_* in Makefile
Dominik Kaiser [Sat, 13 Apr 2024 14:36:07 +0000 (16:36 +0200)]
Change optimization to stack_* in Makefile

I should check the Makefile before committing in the future.

19 months agoRename optimization.c to stack_optimization.c
Dominik Kaiser [Sat, 13 Apr 2024 14:34:23 +0000 (16:34 +0200)]
Rename optimization.c to stack_optimization.c

Also some cleanup and trying to make norminette happy

19 months agoAdd stack optimization
Dominik Kaiser [Sat, 13 Apr 2024 14:29:20 +0000 (16:29 +0200)]
Add stack optimization

I want to use lsd radix sort which only works with positive numbers.
The added functions optimize the stack so it is only positive numbers.
As we don't need the actual contents of the stack, we can just override.

19 months agoAdd empty stack_optimize function
Dominik Kaiser [Sat, 13 Apr 2024 13:32:45 +0000 (15:32 +0200)]
Add empty stack_optimize function

19 months agoAdd radixsort
Dominik Kaiser [Sat, 13 Apr 2024 13:31:29 +0000 (15:31 +0200)]
Add radixsort

19 months agoAdd sorting function (without any sorting yet)
Dominik Kaiser [Sat, 13 Apr 2024 13:09:19 +0000 (15:09 +0200)]
Add sorting function (without any sorting yet)

19 months agoAdd debug printing to main
Dominik Kaiser [Sat, 13 Apr 2024 13:00:31 +0000 (15:00 +0200)]
Add debug printing to main

This will be removed in the end but for now it is nice to see if the
stack has actually been sorted.

19 months agoFix input handling
Dominik Kaiser [Sat, 13 Apr 2024 12:59:17 +0000 (14:59 +0200)]
Fix input handling

Before the fix, the last element was ignored while checking for
duplicates. Now all elements are checked and input handling should
be working fine.

19 months agoAdd command handling to makefile and setup main
Dominik Kaiser [Sat, 13 Apr 2024 12:52:57 +0000 (14:52 +0200)]
Add command handling to makefile and setup main

19 months agoAdd command list printing
Dominik Kaiser [Sat, 13 Apr 2024 12:45:30 +0000 (14:45 +0200)]
Add command list printing

19 months agoFinish command handling and add command printing
Dominik Kaiser [Sat, 13 Apr 2024 12:39:57 +0000 (14:39 +0200)]
Finish command handling and add command printing

19 months agoAdd error handling and create base for commands
Dominik Kaiser [Fri, 12 Apr 2024 18:51:04 +0000 (20:51 +0200)]
Add error handling and create base for commands

19 months agoAdd libft and input handling
Dominik Kaiser [Fri, 12 Apr 2024 16:51:50 +0000 (18:51 +0200)]
Add libft and input handling

19 months agoSetup project
Dominik Kaiser [Fri, 12 Apr 2024 14:23:43 +0000 (16:23 +0200)]
Setup project