Creating a design specification for data structures

1 of
Published on Video
Go to video
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Page 1 (0s)

Creating a design specification for data structures.

Page 2 (10s)

This presentation will cover the following topics.

Page 3 (29s)

Introduction. A group of people sitting at a table.

Page 4 (54s)

Data Points Digital background. 1. The specifications of data structures.

Page 5 (1m 24s)

Data Points Digital background. 2. The operations of data structures.

Page 6 (1m 40s)

Data Points Digital background. 2.1. 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. (www.w3schools.com, n.d.) 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.” (GeeksforGeeks, 2022).

Page 7 (2m 21s)

Data Points Digital background. 2.2. 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.

Page 8 (2m 42s)

Data Points Digital background. List example in python list1 = ["eva", "mia", "nikki"] list2 = [6, 12, 18, 24, 30] list3 = ["car", "bus", "train"] print(list1) print(list2) print(list3).

Page 9 (2m 57s)

Data Points Digital background. Append example names = ["eva", "mia", "nikki"] names.append("rebeca") print(names).

Page 10 (3m 9s)

Data Points Digital background. 3. A stack ADT example.

Page 11 (3m 37s)

Data Points Digital background. 11. 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.

Page 12 (4m 4s)

Data Points Digital background. 12. 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..

Page 13 (4m 25s)

Data Points Digital background. 13. 4. 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 .” (GeeksforGeeks, 2021).

Page 14 (4m 52s)

Data Points Digital background. 14. 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..

Page 15 (5m 16s)

Data Points Digital background. 15. 4.1. Concrete data structure for a First In First out (FIFO) queue example.

Page 16 (5m 31s)

Data Points Digital background. 16. Results. C.Ronaldo.

Page 17 (5m 50s)

Data Points Digital background. 17. 5. Bubble sort.

Page 18 (6m 18s)

Data Points Digital background. 18. 5. Bubble sort example.

Page 19 (6m 43s)

Data Points Digital background. 19. 10 is compared to 11. As 10 is smaller than 11 it remains in place and the sort is complete.

Page 20 (7m 6s)

Data Points Digital background. 20. Quick sort. The quick sort is know as a divide and conquer algorithm. It conquers the problem of an array being out of order by selecting a pivotal point. Once the pivotal element is selected the other elements are partitioned into two sub arrays. As the name suggests it is a fast sorting algorithm. “It has the best time complexity when compared to other sorting algorithms.” (Patel, 2022).

Page 21 (7m 30s)

Data Points Digital background. 21. The quick sort is more useful than the bubble sort in terms of its industrial value and in terms that the yielding of faster results make it more productive. However, the coding is more complicated than the bubble sort. In addition, “It’s difficult to implement since it’s a recursive process, especially if recursion isn’t available.” (Patel, 2022) It also uses more memory than the bubble sort..

Page 22 (7m 54s)

Data Points Digital background. 22. Quick sort example.

Page 23 (8m 18s)

Data Points Digital background. 23. 2 7 3 1 8 9 11 10 14 15.

Page 24 (8m 43s)

Data Points Digital background. 24. 1 2 3 7 8 9 11 10 14 15.

Page 25 (9m 5s)

Data Points Digital background. 25. Dijkstra’s algorithm.

Page 26 (9m 25s)

Data Points Digital background. 26. Dijkstra`s algorithm serves an important purpose in this increasing age of artificial intelligence. “This algorithm is used in GPS devices to find the shortest path between the current location and the destination. It has broad applications in industry, specially in domains that require modelling networks.” (freeCodeCamp.org, 2020) The algorithm begins at the node of the users choosing and examine the graph to locate the shortest path.

Page 27 (9m 49s)

Data Points Digital background. 27. The algorithm keeps a record of the shortest distance from each node making regular updates. Each node is marked as visited and the process continues until every node is added to the path..

Page 28 (10m 5s)

Data Points Digital background. 28. A* Algorithm.

Page 29 (10m 31s)

Data Points Digital background. 29. A* Algorithm.

Page 30 (10m 49s)

Thank You. Presented by Theo Joseph. Data Points Digital background.

Page 31 (11m 0s)

Bibliography. freeCodeCamp.org. (2020). Dijkstra’s Shortest Path Algorithm - A Detailed and Visual Introduction. [online] Available at: https://www.freecodecamp.org/news/dijkstras-shortest-path-algorithm-visual-introduction/#:~:text=You%20need%20to%20follow%20these [Accessed 7 Dec. 2022]. Freecodecamp.org. (2022). [online] Available at: https://www.freecodecamp.org/news/content/images/2020/06/image-126.png [Accessed 7 Dec. 2022]..

Page 32 (11m 26s)

Bibliography. GeeksforGeeks (20 1 7).Abstract Data Types - GeeksforGeeks. [online] GeeksforGeeks. Available at: https://www.geeksforgeeks.org/abstract-data-types/. GeeksforGeeks. (2022).Applications,Advantages and Disadvantages of Array. [online] Available at: https:llwww.geeksforgeeks.orglapplications-advantages-and-disadvantages- of-array-data- Oarray%20is%20a%20static [Accessed 27 Nov. 2022]. Patel, H. (2022).An Overview of QuickSort Algorithm. [online] Medium.Available at: https://towardsdatascience.com/an-overview-of-quicksort-algorithm- b9 144e3.

Page 33 (11m 53s)

Bibliography. R, V. (2021). What is Data Structure: Need, Types & Classification. [online] Great Learning Blog: Free Resources what Matters to shape your Career! Available at: https://www.mygreatlearning.com/blog/data-structure-tutorial-for-beginners/#need-of-data-structure [Accessed 23 Nov. 2022]. www.tutorialspoint.com. (n.d.). What are the specifications and operations of data structures in compiler design? [online] Available at: https://www.tutorialspoint.com/what-are-the-specifications-and-operations-of-data-structures-in-compiler-design# [Accessed 23 Nov. 2022]. www.w3schools.com. (n.d.). Python Arrays. [online] Available at: https://www.w3schools.com/python/python_arrays.asp..