The Data Structure is combination of two words; Explaining it, Data and
Structure. let see each of them in details.
The word Data is Facts and statistics
collected together for reference or analysis. which means,
now,
Representation of "facts", "concepts", or "instructions" in a "formalized manner," which should
be suitable for
communication, "interpretation", or "processing" by human or electronic machine
and the Structure is,
The arrangement of and relations between the parts or elements of something complex.
Data Structures
The Way of organizing data in computer, so that it can be used effectively.
OR
Specialized format for organizing, processing, retrieving and storing data.
Algorithms
Finite sequence of well-defined computer Implementable, Instructions typically to solve a
problem or set of problems.
Un-ambiguous specifications for performing calculations data processing automated reasoning and
other tasks.
E.g
BEGIN:
NUMBER s1, s2, sum
OUTPUT ("Enter Number")
INPUT s1
OUTPUT ("Enter Number")
INPUT s2
sum = s1+s2
OUTPUT (sum)
END
Pseudo Code/Fake Code
Informal, high-level description of operating principle of a computer program o other algorithm.
E.g
INPUT s1
INPUT s2
sum = s1+s2
OUTPUT (sum)
Types
- Linear Data Structure
In Linear data structure data flows in only one direction at a time.
In Linear Data structure, you can only access the element those are before or after the element, from your current element.
Types:- Arrays: Collections of (Homogenous or heterogenous) items
- Linked List: List of items(Homogenous or heterogenous) that are linked to one an-other
- Stack: Stack is a linear data structure that follows a particular order (LIFO) in which the operations are performed.
- Queue: Queue is a linear data structure that follows a particular order (FIFO) in which the operations are performed.
-
Non - Linear Data Structure
In Non Linear data structure data flows in multiple direction at a time.
In Non Linear Data structure, not only you can access the element those are before or after the element, from your current element but also the predecessor and successor of the those element.
Types:- Tree: Collections of (Homogenous or heterogenous) items
- Graph: List of items(Homogenous or heterogenous) that are linked to one and other