Stack is a linear data structure. It is collection of ordered data elements. It is also known as LIFO system (last in first out). It means in this data structure if an element is inserted (push) at last then it will be deleted (pop) at first. Push and pop operations are performed on top of the stack. We can use array and linked list representation to form Stack in memory. Daily life examples of stack is book self, almirah, cards etc.
Monday, May 13, 2024
Stack Data Structure, Push, Pop and Peek Operations , Applications of Stack
C program to generate sparse matrix from given two dimensional array.
C Program to check that given Matrix is Sparse Matrix or Not.
#include <stdio.h>
Sparse Matrix स्पार्स मैट्रिक्स
Sparse matrix is a special type of matrix in which maximum elements [m×n/2 or 50% and more] are zero and some elements are non zero.
Static /Array/Triplet representation of sparse matrix |
Example (उदाहरण)-
Dynamic/Linked list representation of sparse matrix |
- C Program to check that given Matrix is Sparse Mat...
- C program to generate sparse matrix from given two...
Three level architecture of data structure डाटा स्ट्रक्चर के तीन स्तर
Abstract Data Type (ADT) एबस्ट्राक्ट डाटा टाइप
The full form of ADT is Abstract Data Type. As we know that All programming languages have built-in data types like char,int,float,double etc and all types of operations can be performed on this basic data types. So, A data type defines memory size and type of value stored by any variable. but "When programmer decides operation performed on the data type with definition of the data type, then it is called Abstract Data Type." In other words, programmer cannot divide data members of ADT and operations performed on it. Both are considered as a single unit. In ADT, some operations works as an interface with the help of them, data members of ADT are accessed externally. For Example, Stack is an ADT and user can able to perform only predefined operations like push, pop, peep on data elements of stack.
Wednesday, May 8, 2024
Primitive and Non-primitive data structure प्रिमिटिव एवं नॉन-प्रिमिटिव डाटा स्ट्रक्चर
Primitive data structure :- This type of data structure are very old and defined during creation of programming language. These are also called basic or fundamental data structure/data type. These data structures are working on machine code of program.Various computer and programming languages have various representation of primitive data structure.
Static and Dynamic data structure स्टेटिक एवं डायनामिक डाटा स्ट्रक्चर
Static data structure :- if the memory size of any data structure is defined at compile time and No change can be made in its size by user at run time, then this type of data structure is called static data structure. Memory space is not effectively used by static data structure.
Homogeneous and Non-homogeneous (heterogeneous) data structure होमोजिनस एवं नॉन-होमोजिनस या हेटेरोजिनस डाटा स्ट्रक्चर
Homogeneous data structure :- if a data structure stores similar types of data elements then this type of data structure is called homogeneous data structure.
Linear and Non-linear Data Structure लीनियर एवं नॉन- लीनियर डाटा स्ट्रक्चर
I) Linear data structure:- In this type of data structure, data elements are processed one by one in linear order.(Increasing or decreasing) and every operation like Insertion, deletion, traversing etc are performed in definite order.Example:- array, stack, queue, linked list.
Stack Data Structure, Push, Pop and Peek Operations , Applications of Stack
Stack is a linear data structure. It is collection of ordered data elements. It is also known as LIFO system (last in first out). It means i...
-
Topics Covered Unit-01 Data structure Operations performed on Data structure Classification of Data structures Linear and Non Linear data st...
-
IMP QUESTIONS - Data Structures and Algorithms DSA using C/C++ Language. Unit:-1 1.Data structure( Operations performed on Data structure, C...