Basic Algorithm for Stack Data Structure - Data Structures Tutorial

Publicado em: 30 Outubro 2020
no canal de: Rachelle Galina
3
0

Basic Algorithm for Stack Data Structure is a free tutorial by Shibaji Paul from Data Structures course
Link to this course(Special Discount):
https://www.udemy.com/course/data-str...
This is the best Data Structures Course
Course summary:
Recursion, Stack, Polish Notations, infix to postfix, FIFO Queue, Circular Queue, Double Ended Queue, Linked List - Linear, double and Circular - all operations, Stack and Queue using Linked List
What is stack, algorithms for Push and Pop operation. Implementation of Stack data structure using C.
Using Stack - checking parenthesis in an expression
Using Stack - Understanding Polish notations, algorithm and implementation of infix to postfix conversion and evaluation of postfix expression
What is a FIFO Queue, understanding Queue operations - Insert and delete, implementing FIFO Queue
Limitations of FIFO queue, concept of Circular Queue - Implementation of Circular queue.
Concept of Double ended queue, logic development and implementation of double ended queue.
Concept of Linked List - definition, why we need linked list.
Singly Linked List - developing algorithms for various methods and then implementing them using C programming
Doubly Linked List - developing algorithm of various methods and then implementing them using C programming
Circular Linked List - developing algorithm of various methods and then implementing them using C programming
How to estimate time complexity of any algorithm. Big Oh, Big Omega and Big Theta notations.
Recursion, concept of Tail recursion, Recursion Vs Iteration.
Binary Tree, definition, traversal (in-order, pre-order and post-order), binary search tree, implementation.
Heap - concept, definition, almost complete binary tree, insertion into heap, heap adjust, deletion, heapify and heap sort.
English [Auto]
Hello again in this tutorial I'm going to develop the idea of building a stack using one dimensional and let us build a stack of intensives have taken one one dimensional area of it deserves. And in order to keep the track where the last element was inserted we need to have a variable and we usually declare this valuable as the top valuable. So the purpose of having the top variable is just to hold the index of the last inserted element into the stack so that we can go on inserting the next element when our next push is called. And also we can delete that top just by using the dot value. So here we go. We get the top variable and we usually initialize this top variable at the very beginning at minus one or minus one is an invalid index. And since the area is empty so the index of the last inserted element is invalid in this case. And so we are talking minus one. So whenever we need to push an element then what do you do will increment the top by 1. And then the top goes to the zero element. Now the value of top is zero and we can push the number here at 0 it element right now. So the top is holding 0 and that is the index where the last in-session taken place. Not if another Bush operation is called. Then we can just increment the top by one. One small and the top goes here at one and we can assign the value here. So you can see that the BB is holding the position of the last inserted value. Now let me just insert one more element here. So if we call the push operation once more then the top will be incremented to the index to and then we can insert here. And before we increment increment the top in order to assign the next it is a value to the top of the edit. You must ensure that the Adye has probably four elements. That means the ADD is not in the overflow state. And if you go on inserting the elements in this way ultimately the top will have reach to the index four and then the overflow will. The whenever the top comes here at this index. By filling these two elements then another insertion is not possible. We say that in that case it's overflow the size of the area you can see that is fine actually can and in five minutes at most and the indices start from zero to four. So let me just go ahead and insert two more elements to make me understand what exactly happens when the head is full. So if I go ahead and try to push another image top we'll be here at index street and let me just have 15 here and then if I call the push operation once more the top will be here at index 4. And in that case we can insert here. So now if we call the push operation once more we are unable to do that because the air is full. So the condition that we need to check each time prior to perform the operation is that if that top is sized minus one in the top equals with the size minus one size is not five sides minus one is four. So if the top is at that index for then we are unable to push any more with this product


Nesta página do site você pode assistir ao vídeo on-line Basic Algorithm for Stack Data Structure - Data Structures Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Rachelle Galina 30 Outubro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 3 vezes e gostou 0 espectadores. Boa visualização!