-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrange_index.c
More file actions
23 lines (22 loc) · 824 Bytes
/
Copy pathrange_index.c
File metadata and controls
23 lines (22 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* range_index.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yelallam <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/23 21:01:08 by yelallam #+# #+# */
/* Updated: 2026/02/24 10:41:34 by yelallam ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
int range_index(t_stack *head, int min_index, int max_index)
{
while (head)
{
if (head -> index >= min_index && head -> index <= max_index)
return (1);
head = head -> next;
}
return (0);
}