What is Data Structure?
Data Structures are different way of organising data on your computer , that can be used effectively.
So if we want to find any specific colour scale we can find that very easily from the right side box.Because it is well organised.
For software application performance point of view , the efficiency and the performance of the software depends on how the data is stored, organised and grouped together during the program execution.
What is Algorithm?
An algorithm is just a set of instruction to perform a task or solve a problem.
We need a margin in our A4 size paper.So:
- Choosing the scale from different colour scale
- Place the scale to my A4 size paper
- use a pencil or pen and draw the margin
Moreover, Algorithms in our daily life:
To drink a coffee:
1.go to Coffee Shop
This set of steps referees to algorithms.
Algorithms in computer science:
Set of rules for a computer program to accomplish a task.
What makes a good algorithm?
As a software or a computer, our responsibility is to perform operation on the data.First we give some input, then we process it and then we give back processed data as output.Input of data can be in any form.
Example: Google Map
Input(Starting and ending) --> Process(DSA) --> Output(Shortest Path)
Other Example: Library (Well Organised)
Think , if I need algorithms book I first go to computer science section, then Algorithms section.I will able to find my desired book.Because it is well organised Which referrers to Data Structure.
Types of Data Structures
In python, we can devide in 2 sections:
- Non Primitive
- basic data types that can not be broken into simpler data type.
- fixed size and usually smaller in size than non primitive.
- used for simple operation.
- represented in memory as a simple values.
- more complex and can be broken down into smaller data types.
- can be large in size and grow or shrink dynamically.
- used for complex operations such as data manipulation,sorting and searching.
- represented in memory as pointers to other memory locations.
Topic in Data Structure:
These are the data structures we have.There are more but these are the most important one.
Linear data structures are used to represent a sequence of data where the order of elements are important.
Non Linear's are not represented sequentially.Its used to represent a hierarchical relationship between data elements where each element is connected to one or more other elements in a specific way.
Some types of Algorithms:
- Sorting (to sort data in assending or desending order)
- Searching (to find specific value in a data set)
- Graph (to work with data that can be represented as a graph)
- Devide and Conquer
and Many more...