42 Exam 05 -

if (!begin_list || !*begin_list) return ; You need a temporary pointer to swap node contents. However, swapping data is easier than swapping next pointers. (Note: In 42 exam 05, swapping data is allowed because the subject doesn't forbid it. Swapping pointers is for purists.)

When you sit down for Exam 05, remember this: Every peer in your cluster has memorized the exact same man pages. The only difference between a pass and a fail is breathing, planning, and refusing to panic when your first gcc command returns a wall of errors. 42 exam 05

t_list *current; int swapped; void *temp; if (!begin_list if (!begin_list || !*begin_list) return

void ft_list_sort(t_list **begin_list, int (*cmp)()) if (!begin_list void ft_list_sort(t_list **begin_list