-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush_swap.h
62 lines (58 loc) · 2.22 KB
/
push_swap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: amtadevo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/22 16:56:49 by amtadevo #+# #+# */
/* Updated: 2022/11/24 17:18:26 by amtadevo ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PUSH_SWAP_H
# define PUSH_SWAP_H
# include <unistd.h>
# include <stdlib.h>
# include <limits.h>
# include <stddef.h>
# include "libft/libft.h"
void fake_atoi(char *str);
void check_duplicates(char **str, int len);
t_stack *fill_stack(char **str);
void swap(t_stack *top);
void push(t_stack **src, t_stack **dest);
void rotate(t_stack **top);
void ra(t_stack **a);
void rb(t_stack **b);
void rr(t_stack *a, t_stack *b);
void rra(t_stack **a);
void rrb(t_stack **b);
void rrr(t_stack *a, t_stack *b);
void ss(t_stack *a, t_stack *b);
void sa(t_stack *a);
void sb(t_stack *b);
void pa(t_stack **a, t_stack **b);
void pb(t_stack **a, t_stack **b);
void print_error(void);
void zeros_validation(char **str, int len);
int num_len(int num);
int is_sorted(t_stack *top);
void sort3(t_stack **a);
void sort4(t_stack **a, t_stack **b);
void sort5(t_stack **a, t_stack **b);
int max_pos(t_stack *a);
int min_pos(t_stack *a);
char **argv_parsing(int argc, char **argv);
void butterfly(t_stack **a, t_stack **b);
int *str_to_arr(t_stack *a);
int *bubble_sort(t_stack *a);
void indexing(t_stack *a);
void a_to_b(t_stack **a, t_stack **b, int n);
void b_to_a(t_stack **a, t_stack **b);
void sort(t_stack **a, t_stack **b);
void free_str(char **str);
void sort2(t_stack **a);
int place_in_stack(t_stack **a, int data);
int largest_element(t_stack *head);
void del(int data);
#endif