#2. Introduction to Data Structures: Part-1

in #steemstem7 years ago (edited)

Hello Steemit!!
Today I am back with an article on Data Structures, morever for technical student. Hope it will be useful for all. So, let's visit the post to know more about it...

Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective way. Data Structures is about rendering data elements in terms of some relationship, for better organization and storage. For example, we have data player's name "Virat" and age 26. Here "Virat" is of String data type and 26 is of integer data type.

We can organize this data as a record like Player record. Now we can collect and store player's records in a file or database as a data structure. For example: "Dhoni" 30, "Gambhir" 31, "Sehwag" 33

In simple language, Data Structures are structures programmed to store ordered data, so that various operations can be performed on it easily. It represents the knowledge of data to be organized in memory. It should be designed and implemented in such a way that it reduces the complexity and increases the effieciency.

Basic types of Data Structures:

As we have discussed above, anything that can store data can be called as a data structure, hence Integer, Float, Boolean, Char etc, all are data structures. They are known as Primitive Data Structures.

Then we also have some complex Data Structures, which are used to store large and connected data. Some example of Abstract Data Structure are :

Linked List
Tree
Graph
Stack, Queue etc.

All these data structures allow us to perform different operations on data. We select these data structures based on which type of operation is required. We will look into these data structures in more details in our later lessons.

What is an Algorithm?

An algorithm is a finite set of instructions or logic, written in order, to accomplish a certain predefined task. Algorithm is not the complete code or program, it is just the core logic(solution) of a problem, which can be expressed either as an informal high level description as pseudocode or using a flowchart.

Every Algorithm must satisfy the following properties:

Input- There should be 0 or more inputs supplied externally to the algorithm.

Output- There should be atleast 1 output obtained.
Definiteness- Every step of the algorithm should be clear and well defined.

Finiteness- The algorithm should have finite number of steps.

Correctness- Every step of the algorithm must generate a correct output.

An algorithm is said to be efficient and fast, if it takes less time to execute and consumes less memory space. The performance of an algorithm is measured on the basis of following properties :

Time Complexity
Space Complexity
Space Complexity

Its the amount of memory space required by the algorithm, during the course of its execution. Space complexity must be taken seriously for multi-user systems and in situations where limited memory is available.

An algorithm generally requires space for following components :

Instruction Space : Its the space required to store the executable version of the program. This space is fixed, but varies depending upon the number of lines of code in the program.

Data Space : Its the space required to store all the constants and variables value.

Environment Space : Its the space required to store the environment information needed to resume the suspended function.

Time Complexity: Time Complexity is a way to represent the amount of time needed by the program to run till its completion. We will study this in details in later parts.
__
For the first part till here only. I will be back with the next part soon.

Hope I was able to fulfill your expectations of gaining knowledge by satisfying you writing this post. Hope you all like the information provided in the article. Any queries or opinions you want to share are heartily welcome!!
__

If you love thinking, learning science and technology then you can follow me, @light-o-trix

__
If you are interested in various domains of science and mathematics then join the @steemstem project, team to support high quality STEM (Science,Technology, Engineering and Mathematics) related contents. Join them in steemit.chat to interact with the science authors from all over the world.

Sort:  

Really it was very helpful... Thanx a lot for this post!! :)

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
BTC 57978.54
ETH 2283.22
USDT 1.00
SBD 2.47