DATA STRUCTURE
What is Data?
Data is the basic fact or entity that is utilized in calculation or manipulation. There are two different types of data Numeric data and alphanumeric data.
What is Data Structure?
Data Structure is a representation of the logical relationship existing between individual elements of data. In other words, 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.
We can also define data structure as a mathematical or logical model of a 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
Primitive data structure
Primitive data structure is a data structure that can hold a single value in a specific location whereas the non - linear data structure can hold multiple values either in a contiguous location or random locations
The examples of primitive data structure are float , character , integer and pointer .
Non-primitive data structure
The non - primitive data structure is a kind of data structure that can hold multiple values either in a contiguous or random location . The non - primitive data types are defined by the programmer . Examples Arrays , Lists , Files.
The non - primitive data structure is further classified into two categories .
i.e. , linear and non - linear data structure .
Linear Data structure
A data structure is said to be Linear , if its elements are connected in linear fashion by means of logically or in sequence
memory locations
Examples of Linear Data Structure are Stack and Queue
Non-Linear Data Structure
A non-linear data structure is another important type in which data elements are not arranged sequentially; mainly, data elements are arranged in random order without forming a linear structure.
Data elements are present at the multilevel, for example, tree,Graph.
Time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the input
Space complexity of an algorithm quantifies the amount of space or memory taken by an algorithm to run as a function of the length of the input
Asymptotic Analysis.
Usually the time required by an algorithm comes under three types:
Worst case or(Big oh Notation (Ο)): It defines the input for which the algorithm takes the huge time.
Average case or(Omega Notation (Ω)): It takes average time for the program execution.
Best caseor(Theta Notation (θ)): It defines the input for which the algorithm takes the lowest time.
Comments
Post a Comment
Give your Feedback