-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsort_two.c
More file actions
24 lines (22 loc) · 821 Bytes
/
Copy pathsort_two.c
File metadata and controls
24 lines (22 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sort_two.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yelallam <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/21 23:18:03 by yelallam #+# #+# */
/* Updated: 2026/02/24 11:07:45 by yelallam ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void sort_two(t_stack **head)
{
t_stack *node;
if (*head == NULL || (*head)->next == NULL)
return ;
node = (*head)->next;
if ((*head)->data < node -> data)
return ;
ft_swap(head, 'a');
}