Skip to content

Commit

Permalink
normientte
Browse files Browse the repository at this point in the history
  • Loading branch information
SaladBunda committed Apr 7, 2024
1 parent f920d81 commit 2aee72e
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 44 deletions.
16 changes: 0 additions & 16 deletions srcs/extra_sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,14 @@ void sort_four(t_stack *a, t_stack *b)
while (i != a->top)
{
if (i > 1)
{
ra(a);

}
else
{
rra(a);

}
i = get_min_index(a);
}
pb(a, b);
// printf("pb\n");
sort_three(a);
pa(a, b);
// printf("pa\n");
}

void sort_five(t_stack *a, t_stack *b)
Expand All @@ -81,20 +73,12 @@ void sort_five(t_stack *a, t_stack *b)
while (i != a->top)
{
if (i > 2)
{
ra(a);
// printf("ra\n");
}
else
{
rra(a);
// printf("rra\n");
}
i = get_min_index(a);
}
pb(a, b);
// printf("pb\n");
sort_four(a, b);
pa(a, b);
// printf("pa\n");
}
Binary file removed srcs/extra_sort.o
Binary file not shown.
Binary file removed srcs/ft_split.o
Binary file not shown.
Binary file removed srcs/main.o
Binary file not shown.
Binary file removed srcs/operations.o
Binary file not shown.
Binary file removed srcs/operations2.o
Binary file not shown.
Binary file removed srcs/operations3.o
Binary file not shown.
Binary file removed srcs/range.o
Binary file not shown.
Binary file removed srcs/sort.o
Binary file not shown.
Binary file removed srcs/util_func1.o
Binary file not shown.
29 changes: 1 addition & 28 deletions srcs/util_func2.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: ael-maaz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/04 22:26:52 by ael-maaz #+# #+# */
/* Updated: 2024/04/07 22:38:21 by ael-maaz ### ########.fr */
/* Updated: 2024/04/07 22:48:36 by ael-maaz ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -40,33 +40,6 @@ int fcmp(const char *s1, const char *s2)
return (0);
}

char *ft_strnstr(const char *haystack, const char *needle, size_t len)
{
size_t i;
size_t j;
size_t count;

i = 0;
count = ft_strlen((char *)needle);
if (!haystack && len == 0 && needle)
return (NULL);
if (needle[0] == '\0')
return ((char *)haystack);
while (haystack[i] && i < len)
{
j = 0;
while (needle[j] == haystack[i + j] && i + j < len)
{
if (j == count - 1 && needle[j] == haystack[i + j]
&& haystack[i + j] != '\0')
return ((char *)haystack + i);
j++;
}
i++;
}
return (NULL);
}

int get_range(int size)
{
int range;
Expand Down
Binary file removed srcs/util_func2.o
Binary file not shown.

0 comments on commit 2aee72e

Please sign in to comment.