Data Structure:-
The data structure can be defined as the collection of elements and all the possible operations which are required for those set of elements. The operations includes inserting, deleting, searching and printing an element. It is the way of representing logical relationship between individual data elements.
Data structure is the representation of the logical relationship existing between individual elements of data.
A data structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other.
Read Also:
Data structure is define as a mathematical or logical model of particular organization of data items. Data structure mainly specifies the following four things:
Data structure is the representation of the logical relationship existing between individual elements of data.
A data structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other.
Read Also:
Data structure is define as a mathematical or logical model of particular organization of data items. Data structure mainly specifies the following four things:
- Organization of data
- Accessing methods
- Degree of associativity
- Processing alternatives for information
A linear data structure is a data structure whose elements form a sequence, and every element in the structure has a unique predecessor and unique successor.
Examples of linear data structure are arrays, linked lists, stacks and queues.
2. Non-linear data structure:
Examples of linear data structure are arrays, linked lists, stacks and queues.
2. Non-linear data structure:
Non linear data structures are whose elements do not form a sequence. There is no unique predecessor or unique successor.
Examples of non-linear data structures are trees and graphs.
Types Of Liner Data Structure:- There are many types of liner Data Structure, which listed below:
2. Linked List:- Click Here To Know
3. Stack:-
Examples of non-linear data structures are trees and graphs.
Types Of Liner Data Structure:- There are many types of liner Data Structure, which listed below:
- Array
- Linked List
- Stack
- Queue
2. Linked List:- Click Here To Know
3. Stack:-
A stack is a ordered collection of data elements. The elements already stored may be deleted or new elements may be inserted at one end, called the top of the stack. It is a data structure in which only the top element can be accessed.
Unlike array, the definition of the stack provides for insertion and deletion of items, so that stack is a dynamic, constantly changing object. Removing the data element from a stack is called Poping the stack or pop operation and storing an element on the stack is called pushing it onto the stack or push operation. The information stored on the stack much like stacking plates. Using this analogyo stacking plates it is easy to illustrate the stach operation.
It is an ordered list in all insertions and deletions are made at one which end, called shown in the figure, if we have stack of elements 10, 20, 30, 40, 50, 60 then 10 will be the bottommost element and 60 will be the topmost element in the stack.
Let us see the operations which can be carried out on the stack.
Declaration: A stack in C can be declared as a structure containing two objects: an array to hold the elements of the stack, and an integer to indicate the position of the current top of stack within the array.
Unlike array, the definition of the stack provides for insertion and deletion of items, so that stack is a dynamic, constantly changing object. Removing the data element from a stack is called Poping the stack or pop operation and storing an element on the stack is called pushing it onto the stack or push operation. The information stored on the stack much like stacking plates. Using this analogyo stacking plates it is easy to illustrate the stach operation.
It is an ordered list in all insertions and deletions are made at one which end, called shown in the figure, if we have stack of elements 10, 20, 30, 40, 50, 60 then 10 will be the bottommost element and 60 will be the topmost element in the stack.
Let us see the operations which can be carried out on the stack.
- To create a stack.
- To insert an element onto the stack.
- To delete an element from the stack.
- To check which element is at the top of the stack.
- To check whether a stack is empty or not.
Declaration: A stack in C can be declared as a structure containing two objects: an array to hold the elements of the stack, and an integer to indicate the position of the current top of stack within the array.
2 Comments
This is short, post more
ReplyDeleteGood
ReplyDelete