Hi, this semester we are studyinng Data structures in c++. Last time we studied linked stack /the one with the pointers /we said it is like nodes//, I used the standard library in c++
#include <stack>
but do we have a standard linked stack library and I have to implement it? Thanks in advance.
Also wanted to ask: we have a standard libraby <forward_list> - that is for the single list, but I know that there is double linked list, do we have double list standard library. I found a library <list> is this the double list?
Forward lists are implemented as singly-linked lists; Singly linked lists can store each of the elements they contain in different and unrelated storage locations. The ordering is kept by the association to each element of a link to the next element in the sequence.
List containers are implemented as doubly-linked lists; Doubly linked lists can store each of the elements they contain in different and unrelated storage locations. The ordering is kept internally by the association to each element of a link to the element preceding it and a link to the element following it.