[Audio] Welcome to this presentation on creating a design specification for data structures..
[Audio] This presentation will cover the following topics. It will begin by the defining the specifications of data structures. The next topic will deal with the operations of data structures. Examples of how operations can be applied will be then demonstrated by the elucidation of aN data type, and a concrete data type. Then the presentation will focus on two sorting algorithms. There are multiple sorting algorithms but this presentation will focus on the bubble sort and the quick sort. This presentation will conclude by two network shortest path algorithms. The shortest path algorithms that will be adumbrated is the single-source algorithm and the all-pairs algorithm.
[Audio] Data is organized in computer science by using data structures " Data structure provides efficiency, reusability and ion. It plays an important role in enhancing the performance of a program because the main function of the program is to store and retrieve the user's data as fast as possible.
[Audio] The specifics of data structure .The number of components determine how a data structure is specified. Data structures are fixed if the components are even. Data structures are variable when components transform. Arrays and records are examples of fixed-size data structure types. Stacks, lists, sets, tables, and files are an example of variable size data types. Variable size data objects use a pointer data type that enables fixed-size data objects to be connected explicitly by the programmer..
[Audio] This section will adumbrate the operations of data structures. The fixed size data structure type known as arrays and will be discussed. This will be followed by the description of variable size data structure types such as lists and sets..
[Audio] Arrays. The programming language at developers at this company use is Python. This programming language does not support arrays without the import of a library therefore the discussion of arrays will be brief, and no example is necessary. In Python lists are used instead of arrays. Arrays are used in Java to store multiple values in one single variable. The operations that can be performed with arrays are traverse, insertion, deletion, search , and update. Arrays can perform mathematical operations. The limitation of arrays is that the size of the array needs to known in advance. In addition, The array is a static data structure with a fixed size so, the size of the array cannot be modified further and hence no modification can be done during runtime.
[Audio] Lists. Like arrays lists are used to store multiple items in one variable. Unlike arrays lists cannot perform mathematical operations. Lists also use more memory that arrays. The advantage of lists over arrays is that they are changeable and allows duplicates. Operations include Indexing, subscripting, membership test, appending, popping..
[Audio] Here is an example of a list in python.. Data Points Digital background.
[Audio] Here is an example of how to and a new item to the list. This is called appending..
[Audio] An example of an data ( ADT) will be given but first a brief description of ADT` s will be given. ADT`s behaviour is defined be a set of values and operations. It is called because it gives an implementation-independent viewADT`s use class, hides inside details, is reusable, and the concepts are high level. The rule for stack is last in first out so the last element inserted will be at the top of the stack..
[Audio] There are different types of ADT` s such as lists and queues but the example below is that of a stack ADT. The operations used in a ADT stack are push(), pop() peek(), size, isEmpty, and isFull. In this example the picture will illustrate push and pop operations. The push will push a object to the top of the stack. Pop removes the object from the stack the following commands below is instructions to implement world cup teams into a program.
[Audio] Here are the results. Holland was pushed to the top ahead of Argentina. Iran was pushed to the top ahead of Holland but these to items were removed because of two pops. Poland was then pushed to the top above Argentina. Finally, Belgium is pushed to the top of the stack..
[Audio] Concrete data structure for a First In First out ( FIFO) queue. A concrete data structure differs from an ADT because It is a specialized solution-oriented data type that represents a well-defined single solution domain concept. Unlike ADT`s data cannot be improved without breaking the program. Concrete data structure have less efficiency and the concept are simple in contrast to ADT`s. The data type uses structure rather that class and the data is transparent. This data type is hardly ever able to be reused..
[Audio] First in first out( fifo) refers to the linear structure of concrete data structures. Elements are inserted at the back and deleted at the front. Insertion is known as enqueue deletion is known as dequeue other operations include front operation which shares similarities with ADT`s peek and isEmpty which checks whether the queue is empty. The following slide will show an example of a fifo queue using enqueue and dequeue..
[Audio] Here is an example of a concrete data structure for a First In First out ( FIFO) queue. Messi will be added. Cruyff will be removed, Ronaldo will be added as will Mbappe.
[Audio] The results are as follows. Messi is enqueued and thus goes to the back of the queue behind Maradona. Cruyff is dequeued at the front. C.Ronaldo is enqueued, Pele is dequeued. Finally Mbappe is enqueued.
[Audio] The first of two sorting algorithms to be explained is the bubble sort. The bubble sort is a sorting algorithm that is simple and iterative. The methodology of this algorithm is to repeatedly swap adjacent elements until everything is in order. Its time complexity is O(n^2). If the value of n is 2, ideally the loop is going to run 4 times, and if it is 4, it would run 16 times; and so on. For this reason this algorithm is regarded as less useful because it is more time consuming than other sorting algorithms..