03.05.2018, 13:37
Quote:
What is the difference between LIST_push_back_* and LIST_push_front_*? I read documentation of this, but still I don't get it, for example
Код:
new List:list; LIST_push_back_str(list, "This is a test"); Код:
new List:list; LIST_push_front_str(list, "This is a test"); |
One pushes the value at the back (end) of the list, and the other one pushes the value at the front (begin) of the list.
Let's simulate a "push back" and a "push front":
Given a list:
Код:
A -> B -> C
Код:
A -> B -> C -> D
Код:
E -> A -> B -> C -> D