Data Structures

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

undefined. Abstract smoke background. undefined.

Scene 2 (22s)

undefined. [Audio] Data structures are essential for efficient operation as they provide a means to store and organize data so that it can be manipulated in an efficient manner. Various types of data structures exist such as arrays linked lists trees graphs and hash tables all of which have their own particular advantages and disadvantages. Combining the advantages of each data structure can create powerful and effective solutions to various data-related predicaments..

Scene 3 (38s)

undefined. [Audio] Data Structures are a way to store and organize data to facilitate efficient interactions with it. Primitive Data Structures also known as atomic data types are comprised of values which cannot be subdivided. These include integers floats booleans and characters. Abstract Data Structures are more complex and used to store vast interrelated datasets. Examples of these are stacks queues trees and graphs..

Scene 4 (1m 19s)

undefined. [Audio] A stack is a data structure that follows the Last In First Out (L-I-F-O-) principle. It is a linear collection of elements where an element can be added or removed only from one end referred to as the top of the stack. Adding or removing an element from a stack is done in constant time making it an efficient and powerful data structure..

Scene 5 (1m 48s)

undefined. [Audio] A Stack is a data structure that follows the Last-In-First-Out (L-I-F-O-) ordering. Data is only able to be accessed from the top element of the stack since this is the active part which can be modified or removed. All other elements in the stack remain in the order that they were added with the last element to be added being the first to be removed..

Scene 6 (2m 0s)

undefined. [Audio] Stack is a type of data structure which can manage data in an effective way. It implements the Last in First Out rule commonly referred to as lifo. This means that the last item to be added to the stack is always the one that will be taken out first. This rule has useful uses such as confirming the correct balance of parentheses in an expression. Additionally stacks have the advantages of being easy to use and having a fixed size of memory making them useful in particular situations..

Scene 7 (2m 26s)

undefined. [Audio] Creating a stack involves the process of starting a new one without any inputs and with one output the newly created stack. This newly created stack has no preconditions to take into account; it is defined and empty allowing the user to begin working with it straight away. Stack operations are thus an integral part of data structures..

Scene 8 (2m 54s)

undefined. [Audio] For this slide I'd like to talk about stack operations and how they can be used to efficiently store and retrieve data. Specifically the push operation. The push operation adds a value to the top of the stack and updates the stack accordingly. Inputs include a stack or an array of values and the value that you'd like to push onto the stack. Outputs include the updated stack or stack prime with the value pushed onto the top of the stack and the original stack remaining the same. Preconditions are that the stack is not full and that the value to be pushed is of an appropriate type for the elements in the stack. Postconditions are that the updated stack 'S prime' contains the value as its top element and the original stack 'S' remains the same. This slide has outlined a basic overview of how the push operation works for a stack data structure..

Scene 9 (3m 52s)

undefined. [Audio] "Pop() is a function that deletes the last inserted element from a stack. It takes an input of a stack and returns the same stack with one element removed. The removed element is also returned as the output. To use this function the stack must not be empty. This function changes the stack so that the top element is removed and that element is returned as the output..

Scene 10 (4m 27s)

undefined. [Audio] The slide discusses stack operations with the top() operation as an example. This operation takes in a stack element S as an input and returns the last element referred to as E of the stack without removing it. It is important to note that the stack remains the same after the top() operation..

Scene 11 (4m 46s)

undefined. [Audio] The size() function enables us to ascertain the amount of elements in a stack. This function is a fundamental tool employed for manipulating the data within the stack. With this function it is simple to recognize the capacity of the stack and guarantee that we are not overburdening it with excessive data. Comprehending the size of the stack helps us to enhance its performance better..

Scene 12 (5m 2s)

undefined. [Audio] The function isStackEmpty() returns a boolean of true or false depending on if a stack is empty or not. To make it work the stack must first be initialised. Inputs for this function are the stack and the output is true or false based on if the stack is empty or not. This function is very useful for operations involving stack data structure..

Scene 13 (5m 36s)

undefined. [Audio] Given a stack this function determines if it is full or not. Preconditions state that the stack must not be empty and the number of elements in the stack must equal the capacity of the stack. If both of these conditions are met the function will return true otherwise it will return false. The postcondition is that the function will only return true if the stack is full meaning that the number of elements in the stack must be equal to the capacity of the stack. Knowing if a stack is full is important in order to prevent overfilling and ensure all possible values can be collected..

Scene 14 (5m 49s)

undefined. [Audio] Inputs for any stack operation are the stack S The output is an integer N which denotes how many elements are in the stack. Preconditions and postconditions require that no elements have been added or removed at the end of the operation and N is equal to the number of elements in S..

Scene 15 (6m 3s)

undefined. [Audio] A stack is a collection of items stored in a specific order with the restriction that only one item can be added to or removed from the collection at any given time. Examples of stacks include a stack of coins a stack of plates a stack of tennis balls and a stack of books. Stacks are used to store and organize items and have efficient operations for removing items adding items and counting the number of items. Additionally Stacks are essential for tasks such as computing expression evaluation and memory management in computer programming..

Scene 16 (6m 32s)

undefined. [Audio] A stack is a type of data structure that stores and organizes items in a particular order. An example of a stack is a stack of chairs. Stacks are used in many settings for their ability to add and remove items rapidly and efficiently. In retail store personnel often use stacks to organize items like shoe boxes or folded shirts. Cafeterias also often use stacks for their trays. The number of elements in the stack is the total number of items that comprise the stack..

Scene 17 (7m 25s)

undefined. Thankyou…. Our Group Members – PS/2021/114 W.J.E.S.V.Weerasinghe. PS/2021/116 Disara Ransini. PS/2021/117 Pramith Niwendra..