 Welcome to this course on data structures and algorithms. In today's session, we are going to discuss one more example of the use of list. The example that we are considering this time is that of a playlist. All of you are aware of the playlist where you want to play music by selecting certain songs and putting them in the playlist and then playing them. Here is a typical media player. So, the media player will have this kind of interface where you will have various buttons move back, move forward, full forward, full back, pause, play pause. Then there will be a playlist that will be here and these are the songs which are played. You have options of sorting those songs either on the title or on duration. So, this is how typically a media player playlist looks like and this is how we operate the playlist. Let us look at the actual operations that a user would like to perform using media player. First consider that the playlist would have a song ID, a song title, the singer's name and the duration and you have a list of such songs available to you. It is from this list that you will be choosing certain songs to be played or certain songs to be inserted in the playlist and then play them. What are the operations that are typically to be carried out by a user? First, add a song at any position to the playlist. Second, remove a song which I do not want to listen to anymore. Then I want to go to a particular song either by selecting from the playlist or by clicking buttons such as go to the first, previous, next, last, etc. I might want to reverse the list of songs in the playlist. I might wish to sort the list of songs based on either the title or duration. You will recall that all these operations are available in a playlist interface by using appropriate buttons. We start with the initial state where we have an internal pointer pointing to the position in the playlist. When the playlist is empty, there is nothing there and the position is typically at this point. This is an implied position. Playlist itself does not contain this. So, this will be apparently a part of our program which we shall see later. I want to insert a song at position 0. So, note that the iterator i t that we will use is in the original position. Next, I say insert song at position 1. So, the position of iterator i t is still at original position. Next, I insert song at position 0. So, kya va tera vada is now inserted here. I want to insert a song at position 53. Obviously, there is no position 53 because there are fewer songs here. If that is done, then the song is inserted at the end. So, this is what will happen to my playlist when I insert this song. Next, I want to insert a song at position 2. So, note that the position of iterator i t is the original position with respect to that 0, 1, 2. This is the position where I am inserting this song. Now, I press this button. It goes to last. The iterator i t now points to kabhi kushi kabhi gum which was the last song. I might press this previous button in which case the iterator i t will go to the previous song. I might completely go back to the first position in which case the iterator i t will show here kya hoa tera vada. If I move one step next, it will go to the next song. If I move directly to a song by choosing kore rangpe na itna, then the iterator i t will position itself there. I might reverse the list of songs. So, there is a reversal button. If I press this, you will notice that all songs appear now in reverse order. I might want to sort the list of songs by title. So, when I press t, you notice that all songs are sorted in the order of their names or titles. I can also sort based on duration. Of course, the duration is not displayed here, but rest assure that all the songs will appear in the order of their duration. Please note that these two sort buttons are actually toggling kind. That means, if I press this twice, it will sort in the reverse order of names or reverse order of duration, etcetera. I might want to remove a particular song from playlist. So, when I remove this song, this song will be deleted and the rest of the list will be compacted. So, this is how after removal the list will look like. In this session, you have seen the basic operations that user will perform on any playlist of songs. It includes inserting songs, rearranging them, playing any one that I wish and so on. In the next session, we shall see how this playlist can be implemented in C plus plus using the list structure. Thank you.