 myself Rohit Kumar Rudrappa Vakhtarikar working as an assistant professor in computer science and engineering department at Walthamstow Technology, Solapur. So, today we are going to learn list using standard template library that is STL. Learning outcomes of this video at the end of the session students will be able to perform different operations on list using STL. So, list is a container which allows the non-contiguous memory allocation. Insertion operation in array is a very costly because we have to shift all the elements, but by using linked list it will overcome this problem. Means what? Let's say we will have one array of 10 and initially we will have five elements we have stored, but if I want to shift, if I want to insert one specific element at a second position at that time we need to right shift all the elements after second position into the array. Then only we are going to we are allowed to insert the element that is a very costly in an array. So, that is why we are going to use the list collection. So, list can be implemented using the list container. It means we can implement the singly linked list, doubly linked list, all the linked list list using the list containers. So, it supports following operations pushback, pushfront, front, back, reverse, merge and etcetera. There will be a number of functions are available in the list container or list collection. So, let's see these different functions using code blocks. So, now here in our program first of all we need to include this list template, because we are going to list. So, now here again we need to include this iterator. Why this iterator? Because this iterator will allow us to iterate over the list. It is like one looping function. So, iterator function which iterate over the list. So, now let's say we will have this main function. In this main function first of all we need to create some list. So, let's say I want to create a list 1 and list 2. So, at that time we need to specify that I am going to create the list of integer with list 1 and list 2. So, here we have declared the list 1 and list 2 by using this list template. So, now this list container or template again we will use to create the two more list called the list 3 and list 4. It means total here we have used the four list to perform the different operations. So, now in the list 1 and list 2 we will do not have any values currently, but now here list 3 and list 4 have the 1, 2, 3 and 4, 5 respectively in this third and fourth list. So, now what if I want to push some values or elements into my list. So, at that time we need to use pushback. Pushback what it will do? It will put or push the element at the end of the list. So, currently these two lists are empty. So, it will start from the first. So, now here initially we are going to store the five elements in our list. So, now here we will have the i is equals to 0 to 5. So, now what we have done simply I multiplied by 2 it means what in the 2's values we are going to store like 2, 0, 2, 4, 6, 8 in this way we are going to store the values into the list 1. So, after that simply to push some values into the list we have used the i multiplied by 3. So, it is going to be push the elements multiply by 3. So, let us see. So, now simply what I want to do I want to retrieve the values from the list. I want to display it on my console. So, at that time what we are going to do we are going to use the show list is a method or function that is written by us only that is not the inbuilt function. We need to write this show list why because we need to iterate over the list. So, now in this show list method it has one parameter called the list l1. So, this l1 we are getting here and list integer iterator it. So, this iterator it is going to iterate over the list which list this l1 list. So, now here it is equals to l1 dot begin to l1 dot end then plus plus it. So, now here what we are going to do now here simply we are going to print the it. So, this it or iterator instance is going to display the values on the console. So, see here what we have done simply in the show list of list 1. So, we are simply passing this list 1 here. So, after that that one is going to relocate to this code and it will execute this code also. Let us see now here we will have our list see in the list 1 we will have these elements 0, 2, 4, 6, 8 right because what we have done I multiplied by 2 in the multiplication of 2 we are going to store the values in the list right. So, after that let us say I want to perform some operations what I have done after this one I want to push the element at the front of my list ok we will have some values in my list right we have just seen those values. But now I want to push the value at the front of my list and that is the 100 fine. So, let us see here push front of 100 is the inbuilt function push front is the inbuilt function which allows us to insert the element at the first position. So, let us see what will happen. So, after performing this push element push value in the front of element 1 right. So, what we have done we have pushed this 100 into our list 1 at the front. So, now my list becomes 100, 0, 2, 4, 6 and 8 right. So, after that what we have done again see this is our 100. So, now we have displayed that function here by calling displayed that list 1 by calling this show list function ok. So, now let us say I want to iterate over the list and I want to make one pointer like SP is my pointer and I want to insert that element at that SP pointers right. So, what I have done simply here I have created the SP pointer or iterator pointer which is pointing to the list 1 right because list 1 dot begin means what it is pointing to the beginning of my list 1 right. So, what I will do simply list 1 dot insert insert is a inbuilt function which allows us to insert the element at this specific position right. So, after that what we have done simply I have displayed the list of show list of 1 and show list of 2 ok. So, let us see here see what we have done after that insert dot begin right SP dot begin we have inserted this triple 1 right. So, it is again inserted value at the beginning of my list fine and these are the values of my list 2 right. So, now what I want to do I want to retrieve the front and back element ok. So, here what we will have list 1 dot front and list 1 dot back which displays the head of the values and the tail of the values values of the list 1 right. So, let us say I want to perform the reverse operation reverse of the list 1 right. So, simply here what we will do list 1 dot reverse which allows us to print the reverse values of the list 1 ok. So, let us check these 3 operations. So, see list 1 front what we are getting triple 1 right. So, list 1 back what I am getting 8 value that is the last value and what I want to do I want to reverse the list 1 right. So, to perform the reverse operation of this list 1 current values are what we will have triple 1 100 0 2 4 6 and 8. So, after this reverse operation we are getting 8 6 4 2 0 100 and 11. Simply we have reverse the list fine. So, let us say reverse operation is done with us. So, now I want to split the list like list 3 dot splice then list 3 dot begin and list list 4. So, here what it will do placing the values of the list 4 in front of the list 3 right means the list 3 here again will get the values list 3 may what will have 1 2 3 in our list 3. So, splice what we have done inserted the 4 5 in front of this list 3 fine. So, the last operation is what I want to merge the list 2 list right. So, list 3 and list 1 I want to merge. So, what we need to do simply list 3 dot merge list 1. So, already list 3 we have seen right. So, simply I want to perform the merge operation with that list 1. So, here we will print these values let us see 4 5 1 2 3 are the list 3 values and these are remaining are the list 1 values. So, in this way we can perform the any operations on our list fine. So, it is possible to implement the single list using stl. So, pause the video think and write your answer yes it is possible we can implement the SSL using stl hope everyone is getting this concepts the references are from the Balguru Swami. Thank you.