title
3.1 Stack in Data Structure | Introduction to Stack | Data Structures Tutorials

description
In this lecture, I have described stack as abstract data type, introduction to stack and various operations performed on stack with example. DSA Full Course: https: https://www.youtube.com/playlist?list=PLdo5W4Nhv31bbKJzrsKfMpo_grxuLl8LU ******************************************** See Complete Playlists: C Programming Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_S C++ Programming: https://www.youtube.com/playlist?list=PLdo5W4Nhv31YU5Wx1dopka58teWP9aCee Python Full Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31bZSiqiOL5ta39vSnBxpOPT Printing Pattern in C: https://www.youtube.com/playlist?list=PLdo5W4Nhv31Yu1igxTE2x0aeShbKtVcCy DAA Course: https://www.youtube.com/playlist?list=PLdo5W4Nhv31ZTn2P9vF02bkb3SC8uiUUn Placement Series: https://www.youtube.com/playlist?list=PLdo5W4Nhv31YvlDpJhvOYbM9Ap8UypgEy Dynamic Programming: https://www.youtube.com/playlist?list=PLdo5W4Nhv31aBrJE1WS4MR9LRfbmZrAQu Operating Systems: //www.youtube.com/playlist?list=PLdo5W4Nhv31a5ucW_S1K3-x6ztBRD-PNa DBMS: https://www.youtube.com/playlist?list=PLdo5W4Nhv31b33kF46f9aFjoJPOkdlsRc ******************************************** Connect & Contact Me: Facebook: https://www.facebook.com/Jennys-Lectures-CSIT-Netjrf-316814368950701/ Quora: https://www.quora.com/profile/Jayanti-Khatri-Lamba Instagram: https://www.instagram.com/jayantikhatrilamba/ #stack #jennyslectures #datastructure

detail
{'title': '3.1 Stack in Data Structure | Introduction to Stack | Data Structures Tutorials', 'heatmap': [{'end': 440.615, 'start': 412.597, 'weight': 0.794}, {'end': 494.075, 'start': 452.685, 'weight': 0.912}, {'end': 572.697, 'start': 549.084, 'weight': 0.775}, {'end': 666.222, 'start': 622.105, 'weight': 0.734}, {'end': 700.13, 'start': 666.222, 'weight': 0.746}, {'end': 946.469, 'start': 890.031, 'weight': 0.724}], 'summary': 'This tutorial covers the introduction to array, linked list, and stack data structures, emphasizing their storage, operations, and access capabilities. it discusses the unique properties of the stack data structure, including the last in, first out principle, fundamental operations like push and pop, logical representation, constraints on data type, and real-life applications. additionally, it explores the fundamental operations on stacks, memory allocation, implementation, and various applications such as reverse a string, undo mechanism in text editor, recursion, parenthesis balancing, infix to postfix conversion, and evaluation of postfix expressions.', 'chapters': [{'end': 47.659, 'segs': [{'end': 47.659, 'src': 'embed', 'start': 0.59, 'weight': 0, 'content': [{'end': 5.796, 'text': 'right. we have discussed few data structures like array and linked list.', 'start': 0.59, 'duration': 5.206}, {'end': 7.558, 'text': 'how data is stored in array.', 'start': 5.796, 'duration': 1.762}, {'end': 9.16, 'text': 'what are the different operations on array?', 'start': 7.558, 'duration': 1.602}, {'end': 10.101, 'text': 'what is linked list?', 'start': 9.16, 'duration': 0.941}, {'end': 11.923, 'text': 'what are the different operations on linked list?', 'start': 10.101, 'duration': 1.822}, {'end': 13.665, 'text': 'how data is stored in linked list?', 'start': 11.923, 'duration': 1.742}, {'end': 17.409, 'text': 'right and now we will see what is stack data structure.', 'start': 13.665, 'duration': 3.744}, {'end': 20.593, 'text': 'so you can see it is a linear data structure.', 'start': 17.409, 'duration': 3.184}, {'end': 23.968, 'text': 'Fine?. And see in array what is there?', 'start': 21.587, 'duration': 2.381}, {'end': 25.329, 'text': 'Random access is possible.', 'start': 24.168, 'duration': 1.161}, {'end': 27.87, 'text': 'You can directly access any data in a constant time.', 'start': 25.369, 'duration': 2.501}, {'end': 31.832, 'text': 'In linked list what? Only sequential access is possible.', 'start': 28.39, 'duration': 3.442}, {'end': 38.795, 'text': 'Right? What about stack? In stack only you can say limited access is possible.', 'start': 32.452, 'duration': 6.343}, {'end': 43.217, 'text': 'Right? Or you can say it is a ordered list.', 'start': 39.135, 'duration': 4.082}, {'end': 45.338, 'text': 'What is stack? It is an ordered list.', 'start': 43.357, 'duration': 1.981}, {'end': 47.659, 'text': 'Or you can say it is a collection.', 'start': 45.638, 'duration': 2.021}], 'summary': 'Discussion on array, linked list, and stack data structures with their different operations and access capabilities.', 'duration': 47.069, 'max_score': 0.59, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM590.jpg'}], 'start': 0.59, 'title': 'Introduction to array, linked list, and stack', 'summary': 'Covers the data structures array, linked list, and stack, discussing their storage, operations, and access capabilities, emphasizing random access in arrays, sequential access in linked lists, and limited access in stacks.', 'chapters': [{'end': 47.659, 'start': 0.59, 'title': 'Introduction to array, linked list, and stack', 'summary': 'Covers the data structures array, linked list, and stack, discussing their storage, operations, and access capabilities, emphasizing random access in arrays, sequential access in linked lists, and limited access in stacks.', 'duration': 47.069, 'highlights': ['Arrays allow for random access in constant time, while linked lists only support sequential access.', 'Stacks have limited access and can be described as an ordered list or a collection.', 'Introduction to the storage, operations, and access capabilities of arrays, linked lists, and stacks.']}], 'duration': 47.069, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM590.jpg', 'highlights': ['Arrays allow for random access in constant time, while linked lists only support sequential access.', 'Introduction to the storage, operations, and access capabilities of arrays, linked lists, and stacks.', 'Stacks have limited access and can be described as an ordered list or a collection.']}, {'end': 496.797, 'segs': [{'end': 82.299, 'src': 'embed', 'start': 48.139, 'weight': 3, 'content': [{'end': 49.54, 'text': 'Or you can say it is a container.', 'start': 48.139, 'duration': 1.401}, {'end': 60.944, 'text': 'which is going to follow a rule for insertion and deletion of the data right, and what is that rule or what is that restriction, you can say,', 'start': 50.734, 'duration': 10.21}, {'end': 67.389, 'text': 'or what is that principle right, which that stack data structure follow.', 'start': 60.944, 'duration': 6.445}, {'end': 77.837, 'text': 'so that rule is insertion and deletion is possible only from one end Right?', 'start': 67.389, 'duration': 10.448}, {'end': 82.299, 'text': 'This is applied on both insertion and deletion.', 'start': 78.497, 'duration': 3.802}], 'summary': 'Stack data structure allows insertion and deletion only from one end.', 'duration': 34.16, 'max_score': 48.139, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM48139.jpg'}, {'end': 138.367, 'src': 'embed', 'start': 110.598, 'weight': 1, 'content': [{'end': 113.419, 'text': 'you cannot insert CD here from the bottom.', 'start': 110.598, 'duration': 2.821}, {'end': 115.76, 'text': 'you cannot insert from the left or right.', 'start': 113.419, 'duration': 2.341}, {'end': 120.462, 'text': 'the only way is from the top only you can insert that CD right.', 'start': 115.76, 'duration': 4.702}, {'end': 126.721, 'text': 'second case is if you want to take out a CD from this cd, stand, then what you will do.', 'start': 120.462, 'duration': 6.259}, {'end': 131.584, 'text': 'only one option you can take out from the top right.', 'start': 126.721, 'duration': 4.863}, {'end': 136.546, 'text': 'suppose you want to take out this cd, the first cd right.', 'start': 131.584, 'duration': 4.962}, {'end': 138.367, 'text': "so you don't have any option.", 'start': 136.546, 'duration': 1.821}], 'summary': 'Cd can only be inserted and removed from the top, no other options available.', 'duration': 27.769, 'max_score': 110.598, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM110598.jpg'}, {'end': 191.033, 'src': 'embed', 'start': 165.841, 'weight': 2, 'content': [{'end': 170.986, 'text': 'what? what are the meaning of those operations, as well as some applications of stack?', 'start': 165.841, 'duration': 5.145}, {'end': 177.872, 'text': 'in next video we will see how to implement a stack right, using arrays as well as using linked list.', 'start': 170.986, 'duration': 6.886}, {'end': 185.01, 'text': 'so now, like this if you map this real life stack, obviously this is what a stack only.', 'start': 177.872, 'duration': 7.138}, {'end': 187.551, 'text': 'or you can say a stack of plates.', 'start': 185.01, 'duration': 2.541}, {'end': 191.033, 'text': 'right, one plate is you have put one plate here.', 'start': 187.551, 'duration': 3.482}], 'summary': 'The transcript discusses the meaning and applications of stacks, and plans to cover their implementation using arrays and linked lists in the next video.', 'duration': 25.192, 'max_score': 165.841, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM165841.jpg'}, {'end': 300.466, 'src': 'embed', 'start': 267.729, 'weight': 0, 'content': [{'end': 269.35, 'text': 'stack, something like this, like this.', 'start': 267.729, 'duration': 1.621}, {'end': 275.453, 'text': 'this is what a stack you will represent.', 'start': 272.412, 'duration': 3.041}, {'end': 279.255, 'text': 'this. it is a container which has only one open end.', 'start': 275.453, 'duration': 3.802}, {'end': 281.576, 'text': 'you can insert data from here.', 'start': 279.255, 'duration': 2.321}, {'end': 284.497, 'text': 'you can delete a data from here right.', 'start': 281.576, 'duration': 2.921}, {'end': 285.917, 'text': 'there is no other way.', 'start': 284.497, 'duration': 1.42}, {'end': 288.658, 'text': 'this is what a stack logical representation of stuff.', 'start': 285.917, 'duration': 2.741}, {'end': 294.26, 'text': 'this is not actual representation of stack right that we will discuss in later videos.', 'start': 288.658, 'duration': 5.602}, {'end': 300.466, 'text': 'right and In stack insertion operation, when you will insert some data in the stack.', 'start': 294.26, 'duration': 6.206}], 'summary': 'Stack is a container with one open end for inserting and deleting data.', 'duration': 32.737, 'max_score': 267.729, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM267729.jpg'}, {'end': 443.558, 'src': 'heatmap', 'start': 412.597, 'weight': 0.794, 'content': [{'end': 414.038, 'text': 'these are two fundamental operation.', 'start': 412.597, 'duration': 1.441}, {'end': 421, 'text': 'third operation may be peak operation or somewhere it is also known as top operation.', 'start': 414.038, 'duration': 6.962}, {'end': 430.601, 'text': 'It means what it is going to return, the topmost element of the stack without removing that element from the stack.', 'start': 422.119, 'duration': 8.482}, {'end': 437.893, 'text': 'see, pop will return the topmost element from the stack as well as it will remove that element from the stack.', 'start': 431.468, 'duration': 6.425}, {'end': 440.615, 'text': 'see, suppose this is what i have.', 'start': 437.893, 'duration': 2.722}, {'end': 443.558, 'text': 'stack, and in this i have data type 1.', 'start': 440.615, 'duration': 2.943}], 'summary': 'Explains fundamental stack operations: pop and peak.', 'duration': 30.961, 'max_score': 412.597, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM412597.jpg'}, {'end': 494.075, 'src': 'heatmap', 'start': 452.685, 'weight': 0.912, 'content': [{'end': 460.709, 'text': 'right and if and on this stack you will perform peak operation or top operation, it means it will return three,', 'start': 452.685, 'duration': 8.024}, {'end': 463.811, 'text': 'but it will not remove this from the stack.', 'start': 460.709, 'duration': 3.102}, {'end': 465.392, 'text': 'this is the difference.', 'start': 463.811, 'duration': 1.581}, {'end': 473.236, 'text': 'right. fourth, operation may be is empty means it will.', 'start': 465.392, 'duration': 7.844}, {'end': 481.4, 'text': 'true, if the stack is empty, there is no data in the list in the stack right, otherwise it will return false.', 'start': 473.236, 'duration': 8.164}, {'end': 484.467, 'text': 'Another maybe is full.', 'start': 483.003, 'duration': 1.464}, {'end': 491.013, 'text': 'So this function will return true if this stack is full, otherwise it will return false.', 'start': 485.629, 'duration': 5.384}, {'end': 494.075, 'text': 'See, these are not the only operation you can perform.', 'start': 491.694, 'duration': 2.381}], 'summary': "The stack operations return specific values: 'peak' returns 3, 'empty' can return true or false, and 'full' can return true or false.", 'duration': 41.39, 'max_score': 452.685, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM452685.jpg'}], 'start': 48.139, 'title': 'Stack data structure', 'summary': 'Introduces the stack data structure, focusing on its unique properties, such as last in, first out principle and fundamental operations like push and pop. it also discusses logical representation, constraints on data type, and real-life applications.', 'chapters': [{'end': 191.033, 'start': 48.139, 'title': 'Introduction to stack data structure', 'summary': 'Discusses the concept of a stack data structure, emphasizing the rule of insertion and deletion from only one end, illustrated with a real-life example of a cd stand, and hints at the subsequent topics of logical representation, basic operations, and applications of stack data structure.', 'duration': 142.894, 'highlights': ['The rule of insertion and deletion in a stack data structure allows for operations only from one end, creating a restriction similar to inserting and removing CDs from a CD stand.', 'The analogy of a CD stand effectively illustrates the concept of insertion and deletion in a stack data structure, facilitating a clear understanding of the restriction.', 'The upcoming topics of logical representation, basic operations, and applications of stack data structure hint at the comprehensive coverage of the subject in subsequent videos.']}, {'end': 496.797, 'start': 191.033, 'title': 'Stack data structure', 'summary': "Explains the stack data structure, emphasizing the 'last in, first out' principle and its fundamental operations such as push, pop, peak, empty, and full, while highlighting the constraints on data type and the logical representation of a stack.", 'duration': 305.764, 'highlights': ["The stack operates on the principle of 'last in, first out' (LIFO), meaning the last item placed is the first one to be removed. The stack operates on the principle of 'last in, first out' (LIFO), where the last item placed is the first one to be removed.", 'The fundamental operations on a stack include push (inserting data), pop (deleting topmost data), peak (returning topmost element without removing it), empty (checking if the stack is empty), and full (checking if the stack is full). The fundamental operations on a stack include push (inserting data), pop (deleting topmost data), peak (returning topmost element without removing it), empty (checking if the stack is empty), and full (checking if the stack is full).', 'The stack only allows insertion of data of a similar data type, ensuring that all elements are of the same data type, such as integer, character, or float. The stack only allows insertion of data of a similar data type, ensuring that all elements are of the same data type, such as integer, character, or float.', 'The logical representation of a stack involves a container with only one open end, allowing data insertion and deletion from the top, with push and pop operations performed at the top of the stack. The logical representation of a stack involves a container with only one open end, allowing data insertion and deletion from the top, with push and pop operations performed at the top of the stack.']}], 'duration': 448.658, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM48139.jpg', 'highlights': ['The fundamental operations on a stack include push, pop, peak, empty, and full.', "The stack operates on the principle of 'last in, first out' (LIFO).", 'The rule of insertion and deletion in a stack data structure allows for operations only from one end, creating a restriction similar to inserting and removing CDs from a CD stand.', 'The analogy of a CD stand effectively illustrates the concept of insertion and deletion in a stack data structure, facilitating a clear understanding of the restriction.', 'The upcoming topics of logical representation, basic operations, and applications of stack data structure hint at the comprehensive coverage of the subject in subsequent videos.', 'The stack only allows insertion of data of a similar data type, ensuring that all elements are of the same data type, such as integer, character, or float.', 'The logical representation of a stack involves a container with only one open end, allowing data insertion and deletion from the top, with push and pop operations performed at the top of the stack.']}, {'end': 1059.451, 'segs': [{'end': 526.786, 'src': 'embed', 'start': 497.478, 'weight': 4, 'content': [{'end': 500.981, 'text': 'Like you can perform search operation, traverse operation.', 'start': 497.478, 'duration': 3.503}, {'end': 504.423, 'text': 'You can find out that minimum element from the stack.', 'start': 501.501, 'duration': 2.922}, {'end': 506.365, 'text': 'maximum element from the stack right?', 'start': 504.423, 'duration': 1.942}, {'end': 509.727, 'text': 'That thing also we will discuss in a later videos, right?', 'start': 506.965, 'duration': 2.762}, {'end': 512.87, 'text': 'These are some fundamental operations you can perform on stack.', 'start': 510.148, 'duration': 2.722}, {'end': 521.94, 'text': 'fine. now we will see the logical representation of stack as well, as we are going to perform these operations right.', 'start': 513.429, 'duration': 8.511}, {'end': 526.786, 'text': 'so this is how we logically represent the stack right, not actually in the memory.', 'start': 521.94, 'duration': 4.846}], 'summary': 'Fundamental stack operations include search, traversal, finding minimum and maximum elements. logical representation is discussed.', 'duration': 29.308, 'max_score': 497.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM497478.jpg'}, {'end': 572.697, 'src': 'heatmap', 'start': 549.084, 'weight': 0.775, 'content': [{'end': 556.849, 'text': 'you can allocate the memory either Using static memory allocation or dynamic memory allocation.', 'start': 549.084, 'duration': 7.765}, {'end': 559.691, 'text': 'There are two ways to implement stack.', 'start': 556.889, 'duration': 2.802}, {'end': 562.852, 'text': 'Static memory allocation and dynamically you can implement stack.', 'start': 559.731, 'duration': 3.121}, {'end': 566.934, 'text': 'Static means using arrays you can implement stack.', 'start': 563.432, 'duration': 3.502}, {'end': 572.697, 'text': 'Right?. dynamic means using linked list you can implement stack.', 'start': 567.795, 'duration': 4.902}], 'summary': 'Two ways to implement stack: static memory allocation (arrays) and dynamic memory allocation (linked list).', 'duration': 23.613, 'max_score': 549.084, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM549084.jpg'}, {'end': 666.222, 'src': 'heatmap', 'start': 622.105, 'weight': 0.734, 'content': [{'end': 626.726, 'text': 'this is the capacity of the stack at starting top is minus one.', 'start': 622.105, 'duration': 4.621}, {'end': 629.766, 'text': 'right, minus one means somewhere here minus one.', 'start': 626.726, 'duration': 3.04}, {'end': 632.987, 'text': 'hypothetically we assume that here we have minus one index.', 'start': 629.766, 'duration': 3.221}, {'end': 639.418, 'text': 'right now Suppose in the empty stack you call this pop operation.', 'start': 632.987, 'duration': 6.431}, {'end': 645.302, 'text': "What would happen? Pop means the topmost element would be removed, but here we don't have anything.", 'start': 640.058, 'duration': 5.244}, {'end': 646.103, 'text': 'Stack is empty.', 'start': 645.342, 'duration': 0.761}, {'end': 650.026, 'text': 'In this case, it is what? Underflow condition.', 'start': 646.644, 'duration': 3.382}, {'end': 653.589, 'text': 'It will return what? The stack is empty.', 'start': 651.227, 'duration': 2.362}, {'end': 662.877, 'text': "So this is what an underflow condition you can say, right? And now suppose I'm calling push to.", 'start': 653.869, 'duration': 9.008}, {'end': 666.222, 'text': 'right actual implementation.', 'start': 664.261, 'duration': 1.961}], 'summary': 'The stack has an initial capacity of minus one, leading to underflow conditions when empty.', 'duration': 44.117, 'max_score': 622.105, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM622105.jpg'}, {'end': 700.13, 'src': 'heatmap', 'start': 666.222, 'weight': 0.746, 'content': [{'end': 672.744, 'text': 'also we will see how to write down the code for push and pop right here I am just giving you the brief introduction.', 'start': 666.222, 'duration': 6.522}, {'end': 676.566, 'text': 'push 2 means here from the top only you will insert this 2 right.', 'start': 672.744, 'duration': 3.822}, {'end': 677.806, 'text': 'we have only one end.', 'start': 676.566, 'duration': 1.24}, {'end': 679.067, 'text': 'so first of all, what would happen?', 'start': 677.806, 'duration': 1.261}, {'end': 681.148, 'text': 'top is minus 1.', 'start': 679.067, 'duration': 2.081}, {'end': 683.028, 'text': 'so we will increment this top.', 'start': 681.148, 'duration': 1.88}, {'end': 686.23, 'text': 'first of all top plus plus.', 'start': 683.028, 'duration': 3.202}, {'end': 687.61, 'text': 'it means top becomes 0.', 'start': 686.23, 'duration': 1.38}, {'end': 700.13, 'text': 'now now here we have top and now you will insert this 2 right again if you will call push three again.', 'start': 687.61, 'duration': 12.52}], 'summary': 'Demonstrating push and pop operations in a stack, incrementing top and inserting elements.', 'duration': 33.908, 'max_score': 666.222, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM666222.jpg'}, {'end': 765.754, 'src': 'embed', 'start': 732.63, 'weight': 0, 'content': [{'end': 735.772, 'text': 'pop means the 3 would be removed from the stack.', 'start': 732.63, 'duration': 3.142}, {'end': 740.834, 'text': 'and now see, right now we will do top.', 'start': 735.772, 'duration': 5.062}, {'end': 746.33, 'text': 'minus. minus means now again top is zero.', 'start': 740.834, 'duration': 5.496}, {'end': 751.073, 'text': 'or second again, if you do pop.', 'start': 746.33, 'duration': 4.743}, {'end': 755.935, 'text': 'in that case again two would be removed from the list.', 'start': 751.073, 'duration': 4.862}, {'end': 757.656, 'text': 'or simply you can do top.', 'start': 755.935, 'duration': 1.721}, {'end': 765.754, 'text': 'minus minus means top is now minus 1 right.', 'start': 757.656, 'duration': 8.098}], 'summary': 'Demonstrates stack operations, including pop and top, with quantifiable data.', 'duration': 33.124, 'max_score': 732.63, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM732630.jpg'}, {'end': 869.482, 'src': 'embed', 'start': 844.053, 'weight': 3, 'content': [{'end': 850.135, 'text': 'and now here, if you will call isFull function means it will return true, if the stack is full.', 'start': 844.053, 'duration': 6.082}, {'end': 853.117, 'text': 'and now the condition is stack is full, so it would return.', 'start': 850.135, 'duration': 2.982}, {'end': 860.614, 'text': 'at this time, isFull function would return true, right, and when there is nothing in the stack,', 'start': 853.117, 'duration': 7.497}, {'end': 865.458, 'text': 'suppose we have popped out all the data and after that we call is empty.', 'start': 860.614, 'duration': 4.844}, {'end': 869.482, 'text': 'in that case it would return true because stack is empty.', 'start': 865.458, 'duration': 4.024}], 'summary': 'The isfull function returns true when the stack is full, and isempty returns true when the stack is empty.', 'duration': 25.429, 'max_score': 844.053, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM844053.jpg'}, {'end': 946.469, 'src': 'heatmap', 'start': 890.031, 'weight': 0.724, 'content': [{'end': 892.652, 'text': 'i have a string a, b, c and d.', 'start': 890.031, 'duration': 2.621}, {'end': 894.472, 'text': 'so i want to reverse this.', 'start': 892.652, 'duration': 1.82}, {'end': 897.453, 'text': 'i want to print d, c, b and a.', 'start': 894.472, 'duration': 2.981}, {'end': 898.754, 'text': 'so simply what i can do.', 'start': 897.453, 'duration': 1.301}, {'end': 905.095, 'text': 'i can push this into stack first of all a, b, c and d and then pop out.', 'start': 898.754, 'duration': 6.341}, {'end': 908.136, 'text': 'first of all, d would be popped out, then c, then b, then a.', 'start': 905.095, 'duration': 3.041}, {'end': 910.137, 'text': 'this is what we have reversed the string.', 'start': 908.136, 'duration': 2.001}, {'end': 913.939, 'text': 'Second application is for undo mechanism in text editor.', 'start': 910.777, 'duration': 3.162}, {'end': 916.921, 'text': 'I guess everybody have used this undo mechanism.', 'start': 914.219, 'duration': 2.702}, {'end': 918.742, 'text': 'Suppose you have written something.', 'start': 917.421, 'duration': 1.321}, {'end': 923.124, 'text': 'I have written A, B, C, D, E, right? In the text editor and in text editor.', 'start': 919.182, 'duration': 3.942}, {'end': 931.869, 'text': 'And when you press control Z, the shortcut key for undo, then E would be deleted, then D would be deleted, then C, then B, then A.', 'start': 923.184, 'duration': 8.685}, {'end': 936.952, 'text': 'This mechanism is performed using stack in your text editors right?', 'start': 931.869, 'duration': 5.083}, {'end': 942.228, 'text': 'Third application maybe you can use it in recursion or you can say in function call.', 'start': 938.407, 'duration': 3.821}, {'end': 946.469, 'text': 'When you are going to call a function, then obviously something would be returned, some value would be returned.', 'start': 942.828, 'duration': 3.641}], 'summary': 'Using a stack to reverse strings and for undo mechanism in text editors, and in function calls.', 'duration': 56.438, 'max_score': 890.031, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM890031.jpg'}, {'end': 1025.742, 'src': 'embed', 'start': 998.183, 'weight': 2, 'content': [{'end': 1000.885, 'text': 'this thing also we will discuss in detail, right.', 'start': 998.183, 'duration': 2.702}, {'end': 1004.228, 'text': 'fourth, application may be infix to post fix or prefix conversion.', 'start': 1000.885, 'duration': 3.343}, {'end': 1011.135, 'text': 'when you are going to convert these expressions from infix to post fix or infix to prefix, in that case also stack would be used.', 'start': 1004.228, 'duration': 6.907}, {'end': 1013.016, 'text': 'that thing also we will discuss in detail.', 'start': 1011.135, 'duration': 1.881}, {'end': 1017.719, 'text': 'right and as well as in many algorithm stack data structure is used.', 'start': 1013.016, 'duration': 4.703}, {'end': 1022.902, 'text': 'you can say in topological sorting in dfs we are using stack in tower of annoy problem.', 'start': 1017.719, 'duration': 5.183}, {'end': 1025.742, 'text': 'also we are going to use stack in tree traversal.', 'start': 1022.902, 'duration': 2.84}], 'summary': 'Discussion on using stack in infix to postfix/prefix conversion and various algorithms.', 'duration': 27.559, 'max_score': 998.183, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM998183.jpg'}, {'end': 1059.451, 'src': 'embed', 'start': 1041.635, 'weight': 5, 'content': [{'end': 1050.062, 'text': 'this is just an introductory video of this stack to get you familiar with stack, the logical representation of stack,', 'start': 1041.635, 'duration': 8.427}, {'end': 1056.708, 'text': 'how actually we are going to implement stack, how we are actually going to code these operations, we will discuss in next video.', 'start': 1050.062, 'duration': 6.646}, {'end': 1058.55, 'text': "fine, so i'll see you in the next video.", 'start': 1056.708, 'duration': 1.842}, {'end': 1059.451, 'text': 'till then, bye, bye, take care.', 'start': 1058.55, 'duration': 0.901}], 'summary': 'Introductory video on stack implementation and coding operations.', 'duration': 17.816, 'max_score': 1041.635, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM1041635.jpg'}], 'start': 497.478, 'title': 'Stack data structure', 'summary': 'Covers fundamental operations on stack including search, traverse, finding minimum and maximum element, and logical representation of stack, along with discussing memory allocation. it also introduces the stack data structure, covering its logical representation, implementation, and applications, including reverse a string, undo mechanism in text editor, recursion, parenthesis balancing, infix to postfix conversion, and evaluation of postfix expressions.', 'chapters': [{'end': 566.934, 'start': 497.478, 'title': 'Fundamental operations on stack', 'summary': 'Covers fundamental operations on stack including search, traverse, finding minimum and maximum element, and logical representation of stack, along with discussing memory allocation through static and dynamic methods.', 'duration': 69.456, 'highlights': ['The chapter discusses fundamental operations on stack such as search, traverse, finding minimum and maximum element.', 'The logical representation of stack is explained as a tool for understanding, not actual memory representation.', 'The chapter explains the allocation of memory for the stack and the methods such as static and dynamic memory allocation.']}, {'end': 1059.451, 'start': 567.795, 'title': 'Stack data structure introduction', 'summary': 'Introduces the stack data structure, covering its logical representation, implementation, and applications, including reverse a string, undo mechanism in text editor, recursion, parenthesis balancing, infix to postfix conversion, and evaluation of postfix expressions.', 'duration': 491.656, 'highlights': ["Stack applications include reversing a string, text editor's undo mechanism, recursion, checking parenthesis balance, infix to postfix conversion, and evaluation of postfix expressions The stack has various applications, such as reversing a string, implementing the undo mechanism in text editors, handling recursion, checking the balance of parentheses, converting infix to postfix expressions, and evaluating postfix expressions.", 'Explanation of stack capacity, overflow and underflow conditions, push and pop operations The chapter explains the concept of stack capacity, overflow and underflow conditions, and the implementation of push and pop operations for managing the stack data structure.', 'Dynamic memory allocation enables flexible stack implementation, with a demonstration of stack operations using examples and code The chapter demonstrates the usage of dynamic memory allocation for flexible stack implementation and provides examples and code for stack operations.']}], 'duration': 561.973, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/bxRVz8zklWM/pics/bxRVz8zklWM497478.jpg', 'highlights': ['The chapter explains the allocation of memory for the stack and the methods such as static and dynamic memory allocation.', 'Dynamic memory allocation enables flexible stack implementation, with a demonstration of stack operations using examples and code', 'Explanation of stack capacity, overflow and underflow conditions, push and pop operations', 'The logical representation of stack is explained as a tool for understanding, not actual memory representation.', "Stack applications include reversing a string, text editor's undo mechanism, recursion, checking parenthesis balance, infix to postfix conversion, and evaluation of postfix expressions", 'The chapter discusses fundamental operations on stack such as search, traverse, finding minimum and maximum element.']}], 'highlights': ['Arrays allow for random access in constant time, while linked lists only support sequential access.', 'Introduction to the storage, operations, and access capabilities of arrays, linked lists, and stacks.', 'Stacks have limited access and can be described as an ordered list or a collection.', 'The fundamental operations on a stack include push, pop, peak, empty, and full.', "The stack operates on the principle of 'last in, first out' (LIFO).", 'The rule of insertion and deletion in a stack data structure allows for operations only from one end, creating a restriction similar to inserting and removing CDs from a CD stand.', 'The analogy of a CD stand effectively illustrates the concept of insertion and deletion in a stack data structure, facilitating a clear understanding of the restriction.', 'The upcoming topics of logical representation, basic operations, and applications of stack data structure hint at the comprehensive coverage of the subject in subsequent videos.', 'The stack only allows insertion of data of a similar data type, ensuring that all elements are of the same data type, such as integer, character, or float.', 'The logical representation of a stack involves a container with only one open end, allowing data insertion and deletion from the top, with push and pop operations performed at the top of the stack.', 'The chapter explains the allocation of memory for the stack and the methods such as static and dynamic memory allocation.', 'Dynamic memory allocation enables flexible stack implementation, with a demonstration of stack operations using examples and code', 'Explanation of stack capacity, overflow and underflow conditions, push and pop operations', 'The logical representation of stack is explained as a tool for understanding, not actual memory representation.', "Stack applications include reversing a string, text editor's undo mechanism, recursion, checking parenthesis balance, infix to postfix conversion, and evaluation of postfix expressions", 'The chapter discusses fundamental operations on stack such as search, traverse, finding minimum and maximum element.']}