Saturday, 21 January 2017

Stack

I'll directly jump up to stack later on I will post remaining things.As you know how line works i.e if we consider a line for bank so, how does people stand there, new person joins from the last and person standing at the first position withdraws or deposit the money as per his convience and leave the line.
So same happens in Stack.It uses Last In First Out pattern i.e LIFO, where the data is inserted at the last point and data is removed from start.In the below diagram we can see that the red block is inserted at the last and white one at the first but while removing the white block comes out last and the red one first so, this is how it follows the pattern of LIFO.
After this I'll tell you what is queue and next we will compare this both things to understand where this both data structure is use.
If any queries regarding stack kindly post it.I'll help you to clarify it well.



Thursday, 19 January 2017

Chapter 1. Primitive and Abstract Data Structure

As I, told you about what exactly the data structure is (use for storage)so,now we will jump to the next part of data structure.How it is divided into two parts or in what way its divided.

The first question comes in mind while studying this topic is how can we store large amount of data or else we have different structures to store varying amount of data yes or no?

So, I'll answer this question YES,their are different data structure for storing varying amount of data.
For storing numbers single digit we use int data type(data type is a particular type of data item so in this its integer type),float is used for point value(eg: 1.3).So these are PRIMITIVE data structure.

For storing large amount of data we have abstract data structure they are as follows,
Linked list,
Queue,
Array,
Stack,
Heap,
Tree etc which will be explained further.

Introduction to Data Structure

What is DATA?

Everyone knows the answer of this that it is some kind of information regarding anything, in general term it may be address of a person or bills after purchasing something.So we now know the half part of the data structure now next.

What is STRUCTURE?

Normally we can say a way to represent something i.e we use flowchart to represent a flow of model.
A building is a structure after having a building plan.

As we now know what exactly this both word means so, in technical language we can represent this as DATA STRUCTURE are the one which is used to store the data so as to perform operations on it.