0% found this document useful (0 votes)
22 views2 pages

Dsa Notes

Data structures are methods for organizing and storing data efficiently in computers, categorized into primitive and non-primitive types. Primitive data structures include basic types like integers, floats, characters, and booleans, while non-primitive structures combine these to form complex collections such as arrays, linked lists, and trees. Additionally, non-primitive data structures can be classified as linear, where elements are sequentially ordered, or non-linear, where elements are not arranged in a sequence.

Uploaded by

nasreenkausar097
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Dsa Notes

Data structures are methods for organizing and storing data efficiently in computers, categorized into primitive and non-primitive types. Primitive data structures include basic types like integers, floats, characters, and booleans, while non-primitive structures combine these to form complex collections such as arrays, linked lists, and trees. Additionally, non-primitive data structures can be classified as linear, where elements are sequentially ordered, or non-linear, where elements are not arranged in a sequence.

Uploaded by

nasreenkausar097
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Introduction

• Data structures are methods of organizing and storing data in a computer so that it can be used
efficiently.
• How the data is represented means data structure. Data can be logically and Mathematically
model of a particular organization of data.
• (We are going to store the data into the memory in some order that is called the data structure).
1. Primitive Data Structures:
Definition:
• These are basic data types provided by programming languages. They are typically used for
storing single values.
• The data structures that can be manipulated directly by machine instructions are called
primitive data structures.
• Examples:
– Integer: Whole numbers (e.g., -5, 0, 10).
– Float: Numbers with decimal points (e.g., 3.14, -2.5).
– Character: Single letters, numbers, or symbols (e.g., 'a', '7', '$').
– Boolean: Represents true or false values.
• Pointer: Stores the memory address of another variable.
2. Non-Primitive Data Structures:
Definition:
• These are more complex structures created by combining primitive data types. They are used to
store collections of data and enable more advanced operations.
• The data structures that cannot be manipulated directly by machine instructions are called non-
primitive data
Examples:
1. Array
2. Linked List
3. Stack
4. Queue
5. Tree
6. Graph
7. Hash Table
3. Linear vs. Non-Linear:
Non-primitive data structures can be further classified as linear or non-linear.
• Linear: Elements are arranged in a sequential order, like in an array, linked list, stack, or queue.
• Non-linear: Elements are not arranged in a sequence, like in a tree or graph.

You might also like