forward_list::before_begin() in C++ STL
forward_list::before_begin() is an inbuilt function in C++ STL that returns an iterator that points to the position before the first element of the forward_list. Forward list in STL is a singly linked list implementation. This function comes under the <forward_list> header file.
Return value: The function returns an iterator that points to the position before the first element of the forward_list.
The below program demonstrates the above function:
Element of the list are: 10 20 30 40 50
Time Complexity: O(1)
Auxiliary Space: O(1)
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.