You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the subject of libasm, it is said that the ft_list_sort function must be «like the one in the piscine», so it refers to the subject of the C12, in which it is said that the «Function pointed by cmp will be used as follows:
(*cmp)(list_ptr->data, list_other_ptr->data);
cmp could be for instance ft_strcmp.»
This last sentence makes us understand that the comparison function shall return:
a negative int when the first operand is lower than the second one
a positive int when the first operand is greater than the second one
zero as an int when the two operands are equal
That being said, the current comparison function in the ft_list_sort tests is:
Which returns either 1 (a positive int) when the first operand is lower than the second one, or 0 otherwise. Therefore, it doesn't meet the requirement of the subject, and should be replaced by something like:
In the subject of
libasm
, it is said that theft_list_sort
function must be «like the one in the piscine», so it refers to the subject of the C12, in which it is said that the «Function pointed bycmp
will be used as follows:cmp
could be for instance ft_strcmp.»This last sentence makes us understand that the comparison function shall return:
int
when the first operand is lower than the second oneint
when the first operand is greater than the second oneint
when the two operands are equalThat being said, the current comparison function in the
ft_list_sort
tests is:Which returns either 1 (a positive
int
) when the first operand is lower than the second one, or 0 otherwise. Therefore, it doesn't meet the requirement of the subject, and should be replaced by something like:The text was updated successfully, but these errors were encountered: