Linear data structures store data We often need to search for a primitive value or an object in a linear data structure The elements of an array or vector
The data structure is considered to be linear if the data elements construct a sequence of a linear list The elements are adjacently attached to each other and
Data structure is a representation of the logical relationship between There are two ways to represent a linear data structure in memory:
Linear Data Structure: A data structure is said to be linear if its elements form a sequence or a linear list There are basically two ways of representing
In linear data structures, data elements are organized sequentially and therefore they are easy to implement in the computer's memory In nonlinear data
Demonstrate several searching and sorting algorithms III Implement linear and non-linear data structures IV Demonstrate various tree and graph traversal
Depicts the logical representation of data in computer memory Types of Data Structure Arrays Collection of similar type data elements stored at consecutive
Identify particular applications for which each data structure would be suited We will cover the following linear data structures: – Arrays – Stacks
The data elements are not arranged in a sequential structure ? The different non-linear data structures are trees and graphs ? Operations on Non-Primitive
linear list Examples: Array Linked List, Stacks and Queues • Non-Linear: A data structure is said to be non-linear if traversal of nodes is nonlinear in nature
Data Representation and Linear Structures We begin the study of data structure with data representation, i e , different ways to store data in computer memory