This document provides an introduction to data structures. It defines data structures as representations of logical relationships between data elements. Data structures can be primitive, like integers and floats, or non-primitive, like lists, stacks, queues, trees and graphs. Non-primitive data structures are built from primitive structures and emphasize structuring groups of homogeneous or heterogeneous data. The document describes common data structures like arrays, lists, stacks, queues and trees, and explains their properties and implementations.
This document defines and describes different types of data structures. It begins by defining primitive data structures as basic structures directly operated on by the machine, such as integers and floats, and non-primitive data structures as more sophisticated structures derived from primitive ones, such as lists, stacks, queues, trees and graphs. It then provides examples and descriptions of common non-primitive data structures like arrays, lists, stacks, queues, trees and graphs, highlighting their key characteristics and common operations.
The document discusses different data structures including primitive and non-primitive structures. It defines data structures as representations of logical relationships between data elements. Primitive structures like integers are directly operated on by machines while non-primitive structures like arrays, lists, stacks, queues, trees and graphs are built from primitive structures. Arrays store homogeneous data in consecutive memory locations accessed via indexes. Lists use nodes of data and pointer fields, connected in a linear fashion. Stacks and queues follow LIFO and FIFO principles respectively for insertion and removal. Trees have hierarchical relationships and graphs model physical networks with vertices and edges.
data structure details of types and .pptpoonamsngr
The document defines and describes various data structures. It begins by defining data structures as representations of logical relationships between data elements. It then discusses how data structures affect program design and how algorithms are paired with appropriate data structures. The document goes on to classify data structures as primitive and non-primitive, providing examples of each. It proceeds to describe several specific non-primitive data structures in more detail, including lists, stacks, queues, trees, and graphs.
This document discusses different data structures and their characteristics. It defines data structures as ways of organizing data that consider the relationships between data elements. Data structures are divided into primitive and non-primitive categories. Primitive structures like integers are directly supported by programming languages, while non-primitive structures like linked lists, stacks, queues, trees and graphs are built from primitive types. Common operations on data structures include creation, selection, updating, searching, sorting, merging and deletion.
data structure programing language in c.pptLavkushGupta12
A data structure is a specialized format for organizing, processing, retrieving and storing data. There are several basic and advanced types of data structures, all designed to arrange data to suit a specific purpose
This document discusses data structures and algorithm efficiency. It defines data structures as representations of logical relationships between data elements. Data structures are classified as primitive (basic types like integers) and non-primitive (derived types like lists, stacks, queues, trees, graphs). The document explains various non-primitive data structures and their implementations. It also discusses measuring algorithm efficiency, including analyzing best, worst, and average cases. Asymptotic analysis using Big O notation is introduced as a machine-independent way to compare algorithm growth rates and determine asymptotic complexity classes.
A data structure is a specialized format for organizing, processing, retrieving and storing data. There are several basic and advanced types of data structures, all designed to arrange data to suit a specific purpose
This document defines and describes different types of data structures. It begins by defining primitive data structures as basic structures directly operated on by the machine, such as integers and floats, and non-primitive data structures as more sophisticated structures derived from primitive ones, such as lists, stacks, queues, trees and graphs. It then provides examples and descriptions of common non-primitive data structures like arrays, lists, stacks, queues, trees and graphs, highlighting their key characteristics and common operations.
The document discusses different data structures including primitive and non-primitive structures. It defines data structures as representations of logical relationships between data elements. Primitive structures like integers are directly operated on by machines while non-primitive structures like arrays, lists, stacks, queues, trees and graphs are built from primitive structures. Arrays store homogeneous data in consecutive memory locations accessed via indexes. Lists use nodes of data and pointer fields, connected in a linear fashion. Stacks and queues follow LIFO and FIFO principles respectively for insertion and removal. Trees have hierarchical relationships and graphs model physical networks with vertices and edges.
data structure details of types and .pptpoonamsngr
The document defines and describes various data structures. It begins by defining data structures as representations of logical relationships between data elements. It then discusses how data structures affect program design and how algorithms are paired with appropriate data structures. The document goes on to classify data structures as primitive and non-primitive, providing examples of each. It proceeds to describe several specific non-primitive data structures in more detail, including lists, stacks, queues, trees, and graphs.
This document discusses different data structures and their characteristics. It defines data structures as ways of organizing data that consider the relationships between data elements. Data structures are divided into primitive and non-primitive categories. Primitive structures like integers are directly supported by programming languages, while non-primitive structures like linked lists, stacks, queues, trees and graphs are built from primitive types. Common operations on data structures include creation, selection, updating, searching, sorting, merging and deletion.
data structure programing language in c.pptLavkushGupta12
A data structure is a specialized format for organizing, processing, retrieving and storing data. There are several basic and advanced types of data structures, all designed to arrange data to suit a specific purpose
This document discusses data structures and algorithm efficiency. It defines data structures as representations of logical relationships between data elements. Data structures are classified as primitive (basic types like integers) and non-primitive (derived types like lists, stacks, queues, trees, graphs). The document explains various non-primitive data structures and their implementations. It also discusses measuring algorithm efficiency, including analyzing best, worst, and average cases. Asymptotic analysis using Big O notation is introduced as a machine-independent way to compare algorithm growth rates and determine asymptotic complexity classes.
A data structure is a specialized format for organizing, processing, retrieving and storing data. There are several basic and advanced types of data structures, all designed to arrange data to suit a specific purpose
This document provides an overview of the course "Data Structures and Applications" including the module topics, definitions, and classifications of data structures. The first module covers introduction to data structures, including definitions of primitive and non-primitive data structures, data structure operations, arrays, structures, stacks, and queues. Key concepts like dynamic memory allocation and various data structure implementations are also summarized.
This document provides an overview of the course "Data Structures and Applications" which covers various data structures like arrays, stacks, queues, trees, and graphs. It discusses primitive data structures like integers and non-primitive structures like linked lists. Operations on data structures like creation, searching, and deletion are also summarized. Common implementations of stacks and queues using arrays and pointers are mentioned.
This document discusses linear and non-linear data structures. Linear data structures like arrays, stacks, and queues store elements sequentially. Static linear structures like arrays have fixed sizes while dynamic structures like linked lists can grow and shrink. Non-linear structures like trees and graphs store elements in a hierarchical manner. Common abstract data types (ADTs) include stacks, queues, and lists, which define operations without specifying implementation. Lists can be implemented using arrays or linked lists.
Which data structure is it? What are the various data structure kinds and wha...Tutort Academy
Data structures matter because they boost efficiency. Efficiency: By using the appropriate data structures, programmers can create code that runs faster and uses less memory. Reusability: By employing standard data structures, programmers can abstract the crucial operations that are carried out over numerous Data structures using libraries that are specific to Data Structures.
basics of data structure operations
Data structure is an arrangement of data in computer's memory. It makes the data quickly available to the processor for required operations.It is a software artifact which allows data to be stored, organized and accessed.
This document provides an introduction to data structures and algorithms. It defines data structures as a way of organizing data that considers both the items stored and their relationship. Common data structures include stacks, queues, lists, trees, graphs, and tables. Data structures are classified as primitive or non-primitive based on how close the data items are to machine-level instructions. Linear data structures like arrays and linked lists store data in a sequence, while non-linear structures like trees and graphs do not rely on sequence. The document outlines several common data structures and their characteristics, as well as abstract data types, algorithms, and linear data structures like arrays. It provides examples of one-dimensional and two-dimensional arrays and how they are represented in
This document provides an introduction to data structures and algorithms. It defines an algorithm as a set of steps to solve a problem and describes data structures as organized ways to store and access data. Common data structures include arrays, stacks, queues, linked lists, trees and graphs. Abstract data types define the fundamental operations on data objects in a data structure independently of their implementation. Linear data structures like arrays represent lists in one dimension while non-linear structures represent two-dimensional relationships. Stacks follow the last-in, first-out principle with push and pop operations, while queues are first-in, first-out. Selection of the appropriate data structure depends on the application.
This document introduces several common data structures used in computer science, including arrays, linked lists, stacks, queues, trees, and graphs. Arrays store a collection of elements of the same type in a linear order. Linked lists consist of nodes that contain data and links to other nodes, allowing efficient insertion and removal. Stacks and queues are linear data structures where elements can only be added or removed from one end, with stacks following last-in first-out order and queues following first-in first-out order. Trees store hierarchical relationships between elements, and graphs represent relationships between elements without a defined hierarchy.
This document provides an introduction to data structures. It discusses primitive and non-primitive data structures and their classifications. Linear data structures like arrays, stacks, queues and linked lists are covered, along with non-linear structures like trees and graphs. Common operations on data structures like traversing, searching, inserting and deleting are also summarized. Finally, the document introduces abstract data types and provides examples of common ADT specifications for lists, stacks and queues.
This document provides an introduction to data structures. It discusses primitive and non-primitive data structures and their classifications. Linear data structures like arrays, stacks, queues and linked lists are covered, along with non-linear structures like trees and graphs. Common operations on data structures are also summarized such as traversing, searching, inserting and deleting. Finally, abstract data types and examples of common ADTs like lists, stacks and queues are introduced.
This document provides an overview of different data structures. It discusses primitive data structures like integers, floats, characters, and pointers. It also describes non-primitive linear data structures like arrays, stacks, queues, and linked lists. Finally, it covers non-linear data structures of trees and graphs. Linear data structures store elements in a sequence while non-linear structures do not follow a specific sequence. Trees and graphs are commonly used to represent hierarchical and network relationships between data.
The document provides an introduction to data structures. It defines data structures as representations of logical relationships between data elements that consider both the elements and their relationships. It classifies data structures as either primitive or non-primitive. Primitive structures are directly operated on by machine instructions while non-primitive structures are built from primitive ones. Common non-primitive structures include stacks, queues, linked lists, trees and graphs. The document then discusses arrays as a data structure and operations on arrays like traversal, insertion, deletion, searching and sorting.
DS Complete notes for Computer science and EngineeringRAJASEKHARV8
The document provides information about data structures using C programming language. It discusses various topics like arrays, linked lists, stacks, queues, trees and graphs. It provides the syllabus, contents and references for the course on data structures. The document contains lecture notes on different data structure topics with examples and algorithms for common operations like search, insertion, deletion on arrays and linked lists.
Introductiont To Aray,Tree,Stack, QueueGhaffar Khan
This document provides an introduction to data structures and algorithms. It defines key terminology related to data structures like entities, fields, records, files, and primary keys. It also describes common data structures like arrays, linked lists, stacks, queues, trees, and graphs. Finally, it discusses basic concepts in algorithms like control structures, complexity analysis, and examples of searching algorithms like linear search and binary search.
Data structure comes with a number of algorithms. It works with different types of data and structures and organizes data to fulfill a specific purpose. It deals with algorithms, Algorithm design, Algorithm analysis, Graph algorithms, Equivalence relations, Hash functions, hash tables, Theory of computation, linked lists, stacks, queues, searching and sorting techniques, graph data structure, trees, recursion of algorithms. It is technical way of storing data by using some specific techniques in order to use data efficiently.
The document discusses key concepts related to data structures and algorithms. It defines data as values or sets of values that can be organized hierarchically into fields, records, and files. Entities have attributes that can be assigned values. Related entities form entity sets. Data structures organize data through fields, records, and files while supporting operations like searching, insertion, and deletion. Algorithms are step-by-step processes to solve problems in a finite number of steps. The efficiency of algorithms is measured by time and space complexity.
Data Structures and algoithms Unit - 1.pptxmexiuro901
it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,
An improved modulation technique suitable for a three level flying capacitor ...IJECEIAES
This research paper introduces an innovative modulation technique for controlling a 3-level flying capacitor multilevel inverter (FCMLI), aiming to streamline the modulation process in contrast to conventional methods. The proposed
simplified modulation technique paves the way for more straightforward and
efficient control of multilevel inverters, enabling their widespread adoption and
integration into modern power electronic systems. Through the amalgamation of
sinusoidal pulse width modulation (SPWM) with a high-frequency square wave
pulse, this controlling technique attains energy equilibrium across the coupling
capacitor. The modulation scheme incorporates a simplified switching pattern
and a decreased count of voltage references, thereby simplifying the control
algorithm.
This document provides an overview of the course "Data Structures and Applications" including the module topics, definitions, and classifications of data structures. The first module covers introduction to data structures, including definitions of primitive and non-primitive data structures, data structure operations, arrays, structures, stacks, and queues. Key concepts like dynamic memory allocation and various data structure implementations are also summarized.
This document provides an overview of the course "Data Structures and Applications" which covers various data structures like arrays, stacks, queues, trees, and graphs. It discusses primitive data structures like integers and non-primitive structures like linked lists. Operations on data structures like creation, searching, and deletion are also summarized. Common implementations of stacks and queues using arrays and pointers are mentioned.
This document discusses linear and non-linear data structures. Linear data structures like arrays, stacks, and queues store elements sequentially. Static linear structures like arrays have fixed sizes while dynamic structures like linked lists can grow and shrink. Non-linear structures like trees and graphs store elements in a hierarchical manner. Common abstract data types (ADTs) include stacks, queues, and lists, which define operations without specifying implementation. Lists can be implemented using arrays or linked lists.
Which data structure is it? What are the various data structure kinds and wha...Tutort Academy
Data structures matter because they boost efficiency. Efficiency: By using the appropriate data structures, programmers can create code that runs faster and uses less memory. Reusability: By employing standard data structures, programmers can abstract the crucial operations that are carried out over numerous Data structures using libraries that are specific to Data Structures.
basics of data structure operations
Data structure is an arrangement of data in computer's memory. It makes the data quickly available to the processor for required operations.It is a software artifact which allows data to be stored, organized and accessed.
This document provides an introduction to data structures and algorithms. It defines data structures as a way of organizing data that considers both the items stored and their relationship. Common data structures include stacks, queues, lists, trees, graphs, and tables. Data structures are classified as primitive or non-primitive based on how close the data items are to machine-level instructions. Linear data structures like arrays and linked lists store data in a sequence, while non-linear structures like trees and graphs do not rely on sequence. The document outlines several common data structures and their characteristics, as well as abstract data types, algorithms, and linear data structures like arrays. It provides examples of one-dimensional and two-dimensional arrays and how they are represented in
This document provides an introduction to data structures and algorithms. It defines an algorithm as a set of steps to solve a problem and describes data structures as organized ways to store and access data. Common data structures include arrays, stacks, queues, linked lists, trees and graphs. Abstract data types define the fundamental operations on data objects in a data structure independently of their implementation. Linear data structures like arrays represent lists in one dimension while non-linear structures represent two-dimensional relationships. Stacks follow the last-in, first-out principle with push and pop operations, while queues are first-in, first-out. Selection of the appropriate data structure depends on the application.
This document introduces several common data structures used in computer science, including arrays, linked lists, stacks, queues, trees, and graphs. Arrays store a collection of elements of the same type in a linear order. Linked lists consist of nodes that contain data and links to other nodes, allowing efficient insertion and removal. Stacks and queues are linear data structures where elements can only be added or removed from one end, with stacks following last-in first-out order and queues following first-in first-out order. Trees store hierarchical relationships between elements, and graphs represent relationships between elements without a defined hierarchy.
This document provides an introduction to data structures. It discusses primitive and non-primitive data structures and their classifications. Linear data structures like arrays, stacks, queues and linked lists are covered, along with non-linear structures like trees and graphs. Common operations on data structures like traversing, searching, inserting and deleting are also summarized. Finally, the document introduces abstract data types and provides examples of common ADT specifications for lists, stacks and queues.
This document provides an introduction to data structures. It discusses primitive and non-primitive data structures and their classifications. Linear data structures like arrays, stacks, queues and linked lists are covered, along with non-linear structures like trees and graphs. Common operations on data structures are also summarized such as traversing, searching, inserting and deleting. Finally, abstract data types and examples of common ADTs like lists, stacks and queues are introduced.
This document provides an overview of different data structures. It discusses primitive data structures like integers, floats, characters, and pointers. It also describes non-primitive linear data structures like arrays, stacks, queues, and linked lists. Finally, it covers non-linear data structures of trees and graphs. Linear data structures store elements in a sequence while non-linear structures do not follow a specific sequence. Trees and graphs are commonly used to represent hierarchical and network relationships between data.
The document provides an introduction to data structures. It defines data structures as representations of logical relationships between data elements that consider both the elements and their relationships. It classifies data structures as either primitive or non-primitive. Primitive structures are directly operated on by machine instructions while non-primitive structures are built from primitive ones. Common non-primitive structures include stacks, queues, linked lists, trees and graphs. The document then discusses arrays as a data structure and operations on arrays like traversal, insertion, deletion, searching and sorting.
DS Complete notes for Computer science and EngineeringRAJASEKHARV8
The document provides information about data structures using C programming language. It discusses various topics like arrays, linked lists, stacks, queues, trees and graphs. It provides the syllabus, contents and references for the course on data structures. The document contains lecture notes on different data structure topics with examples and algorithms for common operations like search, insertion, deletion on arrays and linked lists.
Introductiont To Aray,Tree,Stack, QueueGhaffar Khan
This document provides an introduction to data structures and algorithms. It defines key terminology related to data structures like entities, fields, records, files, and primary keys. It also describes common data structures like arrays, linked lists, stacks, queues, trees, and graphs. Finally, it discusses basic concepts in algorithms like control structures, complexity analysis, and examples of searching algorithms like linear search and binary search.
Data structure comes with a number of algorithms. It works with different types of data and structures and organizes data to fulfill a specific purpose. It deals with algorithms, Algorithm design, Algorithm analysis, Graph algorithms, Equivalence relations, Hash functions, hash tables, Theory of computation, linked lists, stacks, queues, searching and sorting techniques, graph data structure, trees, recursion of algorithms. It is technical way of storing data by using some specific techniques in order to use data efficiently.
The document discusses key concepts related to data structures and algorithms. It defines data as values or sets of values that can be organized hierarchically into fields, records, and files. Entities have attributes that can be assigned values. Related entities form entity sets. Data structures organize data through fields, records, and files while supporting operations like searching, insertion, and deletion. Algorithms are step-by-step processes to solve problems in a finite number of steps. The efficiency of algorithms is measured by time and space complexity.
Data Structures and algoithms Unit - 1.pptxmexiuro901
it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,
An improved modulation technique suitable for a three level flying capacitor ...IJECEIAES
This research paper introduces an innovative modulation technique for controlling a 3-level flying capacitor multilevel inverter (FCMLI), aiming to streamline the modulation process in contrast to conventional methods. The proposed
simplified modulation technique paves the way for more straightforward and
efficient control of multilevel inverters, enabling their widespread adoption and
integration into modern power electronic systems. Through the amalgamation of
sinusoidal pulse width modulation (SPWM) with a high-frequency square wave
pulse, this controlling technique attains energy equilibrium across the coupling
capacitor. The modulation scheme incorporates a simplified switching pattern
and a decreased count of voltage references, thereby simplifying the control
algorithm.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...shadow0702a
This document serves as a comprehensive step-by-step guide on how to effectively use PyCharm for remote debugging of the Windows Subsystem for Linux (WSL) on a local Windows machine. It meticulously outlines several critical steps in the process, starting with the crucial task of enabling permissions, followed by the installation and configuration of WSL.
The guide then proceeds to explain how to set up the SSH service within the WSL environment, an integral part of the process. Alongside this, it also provides detailed instructions on how to modify the inbound rules of the Windows firewall to facilitate the process, ensuring that there are no connectivity issues that could potentially hinder the debugging process.
The document further emphasizes on the importance of checking the connection between the Windows and WSL environments, providing instructions on how to ensure that the connection is optimal and ready for remote debugging.
It also offers an in-depth guide on how to configure the WSL interpreter and files within the PyCharm environment. This is essential for ensuring that the debugging process is set up correctly and that the program can be run effectively within the WSL terminal.
Additionally, the document provides guidance on how to set up breakpoints for debugging, a fundamental aspect of the debugging process which allows the developer to stop the execution of their code at certain points and inspect their program at those stages.
Finally, the document concludes by providing a link to a reference blog. This blog offers additional information and guidance on configuring the remote Python interpreter in PyCharm, providing the reader with a well-rounded understanding of the process.
Software Engineering and Project Management - Introduction, Modeling Concepts...Prakhyath Rai
Introduction, Modeling Concepts and Class Modeling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO modeling history. Modeling
as Design technique: Modeling, abstraction, The Three models. Class Modeling: Object and Class Concept, Link and associations concepts, Generalization and Inheritance, A sample class model, Navigation of class models, and UML diagrams
Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data modeling Concepts, Object Oriented Analysis, Scenario-Based Modeling, Flow-Oriented Modeling, class Based Modeling, Creating a Behavioral Model.
Batteries -Introduction – Types of Batteries – discharging and charging of battery - characteristics of battery –battery rating- various tests on battery- – Primary battery: silver button cell- Secondary battery :Ni-Cd battery-modern battery: lithium ion battery-maintenance of batteries-choices of batteries for electric vehicle applications.
Fuel Cells: Introduction- importance and classification of fuel cells - description, principle, components, applications of fuel cells: H2-O2 fuel cell, alkaline fuel cell, molten carbonate fuel cell and direct methanol fuel cells.
2. Definition
Data structure is 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.
3. Introduction
Data structure affects the design of both structural & functional aspects of a
program.
Program=algorithm + Data Structure
You know that a algorithm is a step by step procedure to solve a particular
function.
4. Introduction
That means, algorithm is a set of instruction written to carry out certain tasks &
the data structure is the way of organizing the data with their logical relationship
retained.
To develop a program of an algorithm, we should select an appropriate data
structure for that algorithm.
Therefore algorithm and its associated data structures from a program.
5. Classification of Data
Structure
Data structure are normally divided into two broad categories:
Primitive Data Structure
Non-Primitive Data Structure
8. Primitive Data Structure
There are basic structures and directly operated upon by the
machine instructions.
In general, there are different representation on different
computers.
Integer, Floating-point number, Character constants, string
constants, pointers etc, fall in this category.
9. Non-Primitive Data
Structure
There are more sophisticated data structures.
These are derived from the primitive data structures.
The non-primitive data structures emphasize on structuring of a
group of homogeneous (same type) or heterogeneous (different
type) data items.
10. Non-Primitive Data
Structure
Lists, Stack, Queue, Tree, Graph are example of non-primitive
data structures.
The design of an efficient data structure must take operations
to be performed on the data structure.
11. Non-Primitive Data
Structure
The most commonly used operation on data structure are broadly categorized
into following types:
Create
Selection
Updating
Searching
Sorting
Merging
Destroy or Delete
12. Different between them
A primitive data structure is generally a basic structure that is
usually built into the language, such as an integer, a float.
A non-primitive data structure is built out of primitive data
structures linked together in meaningful ways, such as a or a
linked-list, binary search tree, AVL Tree, graph etc.
13. Description of various
Data Structures : Arrays
An array is defined as a set of finite number of homogeneous
elements or same data items.
It means an array can contain one type of data only, either all
integer, all float-point number or all character.
14. Arrays
Simply, declaration of array is as follows:
int arr[10]
Where int specifies the data type or type of elements arrays stores.
“arr” is the name of array & the number specified inside the square brackets is
the number of elements an array can store, this is also called sized or length of
array.
15. Arrays
Following are some of the concepts to be remembered about
arrays:
The individual element of an array
can be accessed by specifying
name of the array, following by
index or subscript inside square
brackets.
The first element of the array has
index zero[0]. It means the first
element and last element will be
specified as:arr[0] & arr[9]
Respectively.
16. Arrays
The elements of array will always be
stored in the consecutive (continues)
memory location.
The number of elements that can be stored
in an array, that is the size of array or its
length is given by the following equation:
(Upperbound-lowerbound)+1
17. Arrays
For the above array it would be
(9-0)+1=10,where 0 is the
lower bound of array and 9 is
the upper bound of array.
Array can always be read or
written through loop. If we read
a one-dimensional array it
require one loop for reading and
other for writing the array.
18. Arrays
For example: Reading an array
For(i=0;i<=9;i++)
scanf(“%d”,&arr[i]);
For example: Writing an array
For(i=0;i<=9;i++)
printf(“%d”,arr[i]);
19. Arrays
If we are reading or writing two-
dimensional array it would require
two loops. And similarly the array
of a N dimension would required N
loops.
Some common operation
performed on array are:
Creation of an array
Traversing an array
20. Arrays
Insertion of new element
Deletion of required element
Modification of an element
Merging of arrays
21. Lists
A lists (Linear linked list) can be defined as a collection of variable number of data
items.
Lists are the most commonly used non-primitive data structures.
An element of list must contain at least two fields, one for storing data or
information and other for storing address of next element.
As you know for storing address we have a special data structure of list the address
must be pointer type.
22. Lists
Technically each such element is referred to as a node,
therefore a list can be defined as a collection of nodes as show
bellow:
Head
AAA BBB CCC
Information field Pointer field
[Linear Liked List]
23. Lists
Types of linked lists:
Single linked list
Doubly linked list
Single circular linked list
Doubly circular linked list
24. Stack
A stack is also an ordered collection of elements like arrays,
but it has a special feature that deletion and insertion of
elements can be done only from one end called the top of the
stack (TOP)
Due to this property it is also called as last in first out type of
data structure (LIFO).
25. Stack
It could be through of just like a stack of plates placed on table in a party, a guest
always takes off a fresh plate from the top and the new plates are placed on to the
stack at the top.
It is a non-primitive data structure.
When an element is inserted into a stack or removed from the stack, its base remains
fixed where the top of stack changes.
26. Stack
Insertion of element into stack is called PUSH and deletion of
element from stack is called POP.
The bellow show figure how the operations take place on a
stack:
PUSH POP
[STACK]
27. Stack
The stack can be implemented into two ways:
Using arrays (Static
implementation)
Using pointer (Dynamic
implementation)
28. Queue
Queue are first in first out type of data structure (i.e. FIFO)
In a queue new elements are added to the queue from one end called REAR end
and the element are always removed from other end called the FRONT end.
The people standing in a railway reservation row are an example of queue.
29. Queue
Each new person comes and stands at the end of the row and person getting
their reservation confirmed get out of the row from the front end.
The bellow show figure how the operations take place on a stack:
10 20 30 40 50
front rear
30. Queue
The queue can be implemented into two ways:
Using arrays (Static
implementation)
Using pointer (Dynamic
implementation)
31. Trees
A tree can be defined as finite set of data items (nodes).
Tree is non-linear type of data structure in which data items are
arranged or stored in a sorted sequence.
Tree represent the hierarchical relationship between various
elements.
32. Trees
In trees:
There is a special data item at the top of hierarchy called the Root of the tree.
The remaining data items are partitioned into number of mutually exclusive
subset, each of which is itself, a tree which is called the sub tree.
The tree always grows in length towards bottom in data structures, unlike
natural trees which grows upwards.
33. Trees
The tree structure organizes the data into branches, which
related the information.
A
B C
D E F G
root
34. Graph
Graph is a mathematical non-linear data structure capable of
representing many kind of physical structures.
It has found application in Geography, Chemistry and
Engineering sciences.
Definition: A graph G(V,E) is a set of vertices V and a set of
edges E.
35. Graph
An edge connects a pair of vertices and many have weight such
as length, cost and another measuring instrument for according
the graph.
Vertices on the graph are shown as point or circles and edges
are drawn as arcs or line segment.