
Understanding Data Structures: Basics and Types
Learn about data structures, the way data is collected and organized for effective operations, types of data structures including primitive, non-primitive, and user-defined structures, and how they are used in programming. Explore examples of primitive data structures like char, integer, float, Boolean, and pointers, as well as non-primitive structures such as arrays, lists, trees, graphs, and files.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
INTRODUCTION TO DATA STRUCTURES A.H. A.H. Amalorpava Amalorpava Akila Assistant Professor, Assistant Professor, Department of Computer Science, Department of Computer Science, St.Joseph s St.Joseph s College(Autonomous), College(Autonomous), Tiruchirappalli Tiruchirappalli 620 002. 620 002. Akila
WHAT IS DATA STRUCTURE? Data structure is a way of collecting and organizing the data in such a way that we can perform operations on these data in an effective way. The operations are adding, updating, deleting, sorting, searching the data and so on. For example, we have some data which has, Employee's name Here Raju" is of String String data type and 25 is of integer name Raju" and age age 25. integer d data type. We can organize these data as a record like Employee employee's name and age in it. Now we can collect and store employee's records in a file or database database as a data structure. Employee record, which will have both file For For example example: Employee Name Employee Name Age Age Tony Arun Gokul 25, 33, 26
TYPES OF DATA STRUCTURES Primitive data structures Built-in data structures Non-primitive data structures User defined data structures
TYPES OF DATA STRUCTURES Primitive data structures char ( Example: char sex= m ; char ename[25]; ) integer ( Example: int age; ) float (Example: float salary; ) Boolean (Example: bool flag; ) Pointer ( Example: int *p, q=10; ) p=&q;
TYPES OF DATA STRUCTURES Non-primitive data structures Arrays Array is a kind of data structure that can store a fixed-size sequential collection of elements of the same type. ( Example: int num[10];, char choice[3]= yes ) Lists Linear list ( stacks and queues using an array) Data items are arranged in sequence. Traverse through elements or nodes sequentially. ( Example Example: Array ) Non-linear list ( Trees and Graphs ) Data items are not in sequence. One node might be connected to several other nodes it can t always be traversed sequentially. ( Example Example: Trees and Graphs ) Files A file file is an object on a computer that stores data and information. A file is created using a software program on the computer. For example, to create a text file you would use a text editor. Computer files are stored on a drive (e.g., the hard drive), disc, (e.g., DVD).