_Lesson 1 - Introduction to Data Structures.pptx.pdf
Document Details
Uploaded by RazorSharpTropicalRainforest
Polytechnic University of the Philippines
Tags
Related
- Data Structures - Ellis Horowitz, Sartaj Sahni - Fundamentals - PDF
- Data Structures Midterms Reviewer PDF
- Introduction to Java Programming and Data Structures (2019) by Y. Daniel Liang - PDF
- II-Sem Computer Science Syllabus PDF
- Bihar STET 2023 Computer Science Paper II PDF
- Introduction To Data Structures PDF
Full Transcript
Lesson 1: Introduction to Data Structures Topic Outline Definition of Data Structure Characteristics of Data Structure Classification of Data Structure Data Type vs Data Structure Advantages and Disadvantages of Data Structure Needs of Data Structure Importance of Data Structure Decon...
Lesson 1: Introduction to Data Structures Topic Outline Definition of Data Structure Characteristics of Data Structure Classification of Data Structure Data Type vs Data Structure Advantages and Disadvantages of Data Structure Needs of Data Structure Importance of Data Structure Deconstructing definition of Data Structures Data ▪ “raw facts” ▪ information ▪ in a form of numbers, text, images, figures, or any other format ▪ structure or unstructured Structure ▪ (noun) - something arranged in a definite pattern of organization Definition of Data Structure Data Structures ▪ A specific way of organizing data in a specialized format on a computer so that the information can be organized, processed, stored, and retrieved quickly and effectively. ▪ They are a means of handling information, rendering the data for easy use. ▪ An integral part of computers used for the arrangement of data in memory. Characteristics of Data Structure Characteristics of Data Structures Linear or Non-Linear Static and Dynamic Time Complexity Correctness Space Complexity Classification of Data Structure Linear and Non-Linear ▪ In Linear, data elements are arranged sequentially or linearly, where each element is attached to its previous and next adjacent elements. ▪ Examples of linear data structures are array, stack, queue, linked list, etc. ▪ In Non-Linear, data elements are not placed sequentially or linearly. In a non-linear data structure, we can’t traverse all the elements in a single run only. ▪ Examples of non-linear data structures are trees and graphs. Static and Dynamic ▪ Static data structure has a fixed memory size. It is easier to access the elements in a static data structure. ▪ An example of this data structure is an array. ▪ In the dynamic data structure, the size is not fixed. It can be randomly updated during the runtime which may be considered efficient concerning the memory (space) complexity of the code. ▪ Examples of this data structure are queue, stack, etc. Homogenous and Non-Homogenous ▪ Homogenous data structures consist of the same data element type, like element collections found in an array. ▪ In Non-Homogenous data structures, the data don’t have to be the same type, such as Linked List. Data Types vs Data Structure Data and Data Type ▪ Data is information optimized for processing and movement, facts and figures stored on computers. ▪ Data Type is a classification, or attribute of data which tells the compiler or interpreter how the programmer intends to use the data. Data Type vs Data Structure Data Type Data Structure The data type is the form of a variable to which a value Data structure is a collection of different kinds of data. That can be assigned. It defines that the particular variable entire data can be represented using an object and can be will assign the values of the given data type only. used throughout the program. It can hold value but not data. Therefore, it is dataless. It can hold multiple types of data within a single object. The implementation of a data type is known as abstract Data structure implementation is known as concrete implementation. implementation. Data Type vs Data Structure (Cont.) Data Type Data Structure In data structure objects, time complexity plays an important There is no time complexity in the case of data types. role. While in the case of data structures, the data and its value In the case of data types, the value of data is not stored acquire the space in the computer’s main memory. Also, a because it only represents the type of data that can be data structure can hold different kinds and types of data stored. within one single object. Data type examples are int, float, double, etc. Data structure examples are stack, queue, tree, etc. Advantage and Disadvantage of Data Structure Advantages 1. Good solution for storing data on framework. 2. Easier for us to handle data. 3. Aid us in efficiently storing data on circles so that we can recover the data. 4. Critical for planning computations. 5. The speed of program execution depends on the type of data structure used. 6. Allow us to reuse data. 7. Chart let us visualize, interact with, and model real-world challenges. Advantages (Cont.) 8. Trees are data structures that let us see, carry out, and operate with hierarchical data sets. 9. Data structures provide data deliberation so that the client does not have to be concerned with how the data is stored. 10. When working with large data sets, the program's effectiveness is largely determined by the type of data structure used. 11. Used in the database administration framework (DBMS) 12. Serve a variety of functional objectives, such as dynamic memory distribution, process planning, record framework association, word reference, and so on. Disadvantages 1. The more the application or data structure involved in creating and maintaining the application, the greater the labor supply. 2. Planning data structures without preparation is extremely difficult and may need sophisticated calculations and significant effort in addition to tests. 3. Larger applications necessitate data structures within each other, just like the hub of a chart is made up of an exhibit or a rundown. As a result, maintenance is both puzzling and costly in such cases. Needs of Data Structure Needs of Data Structure ▪ Provides a way of organizing, managing, and storing data efficiently. ▪ Data items can be traversed easily. ▪ Provides efficiency, reusability and abstraction. ▪ 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. Importance of Data Structure Importance of Data Structure Efficiency: Data structures can help to improve the efficiency of software by reducing the time and space required to perform operations on data. For example, using a hash table to store data can make it much faster to search for specific items. Importance of Data Structure (Cont.) Flexibility: Data structures can make software more flexible and adaptable to change. For example, using a linked list to store data makes it easy to add and remove items from the list without having to shift the other items around. Importance of Data Structure (Cont.) Scalability: Data structures can help to make software more scalable, meaning that it can handle larger amounts of data and more users without becoming slower or less responsive. For example, using a database to store data makes it possible to handle very large datasets with ease. Importance of Data Structure (Cont.) Every application, piece of software, or programs foundation consists of two components: algorithms and data. Data is information, and algorithms are rules and instructions that turn the data into something useful to programming. Importance of Data Structure (Cont.) Put another way, remember these two simple equations: Related data + Permissible operations on the data = Data Structures Data structures + Algorithms = Programs References https://www.geeksforgeeks.org/data-structures/ https://www.geeksforgeeks.org/what-is-data-structure-types-classifications-a nd-applications/ https://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-data-str ucture https://www.javatpoint.com/advantages-and-disadvantages-of-data-structure https://www.mygreatlearning.com/blog/data-structure-tutorial-for-beginners/ #:~:text=Data%20Structures%20are%20necessary%20for,retrieval%2C%20or% 20processing%20of%20data.