-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmall_sort.c
More file actions
24 lines (22 loc) · 1.06 KB
/
small_sort.c
File metadata and controls
24 lines (22 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* :::::::: */
/* small_sort.c :+: :+: */
/* +:+ */
/* By: lorenasmienk <lorenasmienk@student.coda +#+ */
/* +#+ */
/* Created: 2019/12/26 12:40:45 by lorenasmien #+# #+# */
/* Updated: 2020/01/02 13:55:13 by lsmienk ######## odam.nl */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void small_sort(t_setting *set, int part)
{
if (part == 3)
sort_three(set, set->a, 'a');
if (part == 2)
{
if (!is_sorted(set->a, (part)))
swap(set, 'a');
}
}