SlideShare a Scribd company logo
Introduction to Data Structures
By :- Anay singh tomar
BE cse 3rd
sem
Data Structures
A data structure is a scheme
for organizing data in the
memory of a computer.
Some of the more commonly
used data structures include
lists, arrays, stacks, queues,
heaps, trees, and graphs.
Binary Tree
The way in which the data is
organized affects the
performance of a program
for different tasks.
Computer programmers
decide which data structures
to use based on the nature
of the data and the
processes that need to be
performed on that data.
Binary Tree
Example: A Queue
A queue is an example of commonly used simple data
structure. A queue has beginning and end, called the front
and back of the queue.
Data enters the queue at one end and leaves at the other.
Because of this, data exits the queue in the same order in
which it enters the queue, like people in a checkout line at
a supermarket.
Example: A Binary Tree
A binary tree is another
commonly used data
structure. It is organized like
an upside down tree.
Each spot on the tree, called
a node, holds an item of data
along with a left pointer and
a right pointer. Binary Tree
The pointers are lined up
so that the structure forms
the upside down tree, with
a single node at the top,
called the root node, and
branches increasing on the
left and right as you go
down the tree.
Binary Tree
Choosing Data Structures
By comparing the queue with
the binary tree, you can see
how the structure of the data
affects what can be done
efficiently with the data.
A queue is a good data structure
to use for storing things that need
to be kept in order, such as a set
of documents waiting to be
printed on a network printer.
.
The jobs will be printed in the
order in which they are received.
Most network print servers
maintain such a print queue.
.
A binary tree is a good data
structure to use for searching
sorted data.
The middle item from the list is
stored in the root node, with
lesser items to the left and greater
items to the right.
A search begins at the root. The
computer either find the data, or
moves left or right, depending on
the value for which you are
searching.
Each move down the tree cuts the
remaining data in half.
Items can be located very quickly
in a tree.
Telephone directory assistance
information is stored in a tree, so
that a name and phone number
can be found quickly.
For some applications, a queue is
the best data structure to use.
For others, a binary tree is better.
Programmers choose from
among many data structures
based on how the data will be
used by the program.
Data Structures in Alice
Alice has two built-in data structures
that can be used to organize data, or
to create other data structures:
• Lists
• Arrays
Lists
A list is an ordered set of data. It is often used to store
objects that are to be processed sequentially.
A list can be used
to create a queue.
Arrays
An array is an indexed set of variables, such as
dancer[1], dancer[2], dancer[3],… It is like a set of
boxes that hold things.
A list is a set of items.
An array is a set of
variables that each
store an item.
Arrays and Lists
You can see the difference between arrays and
lists when you delete items.
Arrays and Lists
In a list, the missing spot is filled in when
something is deleted.
In an array, an empty variable is left behind
when something is deleted.
Lists
A list is created in Alice by checking the make a
list box when creating a new variable.
Make a list box
Lists
The For all in order and For all together tiles can
be used to work with lists. They are at the
bottom of the editor area.
Arrays
Arrays can be created in a similar manner, but
more often they are created using the array
visualization object from the Alice local gallery.
The Array Visualization object
has special properties and
methods for manipulating
the elements in an array.
Arrays
Alice has a set of built-in functions that can be
performed on arrays.

More Related Content

PPT
Presentation on data structure And algorithms
PPT
PPT_DATA STRUCTURE.ppt
PPTX
Introduction of Data Structure
PPT
Data Structures linked Lists Arrays introduction
PPT
09c-DataStructuresListsArrays.ppt
PPT
09c-DataStructuresListsArrays (1).p with all informationpt
PPT
09c-DataStructuresListsArrays.ppt
PPT
Data Structures
Presentation on data structure And algorithms
PPT_DATA STRUCTURE.ppt
Introduction of Data Structure
Data Structures linked Lists Arrays introduction
09c-DataStructuresListsArrays.ppt
09c-DataStructuresListsArrays (1).p with all informationpt
09c-DataStructuresListsArrays.ppt
Data Structures

Similar to data structure and algorithms arrayby anay.pptx (20)

PPT
data structures
PPT
Struktur data ppt
PPTX
Circular Linked List.pptx
PPTX
Data Structures - Lecture 2 [Introduction to Data Structures]
PPT
Ch 8 introduction to data structures
PDF
PPT
Lecture 1 - Overview of Data Structure .ppt
PPT
Unit 1.ppt
PDF
PPT
Fundamentals of data structure syallabus
PPT
data structure algorithm example and example
PPT
DS.ppt Datatastructures notes presentation
PPTX
Introduction to data structures (ss)
PPT
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
PPT
PMDATA STRUICVIUDGHfjufguigfuigkguidfui.ppt
PPT
1597380885789.ppt
PPT
data structure programing language in c.ppt
PPTX
DATA STRUCTURES and its classifications.pptx
PDF
Data Structure Introduction.pdfssssssssssss
PPT
different types of data structures using c.ppt
data structures
Struktur data ppt
Circular Linked List.pptx
Data Structures - Lecture 2 [Introduction to Data Structures]
Ch 8 introduction to data structures
Lecture 1 - Overview of Data Structure .ppt
Unit 1.ppt
Fundamentals of data structure syallabus
data structure algorithm example and example
DS.ppt Datatastructures notes presentation
Introduction to data structures (ss)
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
PMDATA STRUICVIUDGHfjufguigfuigkguidfui.ppt
1597380885789.ppt
data structure programing language in c.ppt
DATA STRUCTURES and its classifications.pptx
Data Structure Introduction.pdfssssssssssss
different types of data structures using c.ppt
Ad

Recently uploaded (20)

PDF
Classroom Observation Tools for Teachers
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Institutional Correction lecture only . . .
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Classroom Observation Tools for Teachers
Anesthesia in Laparoscopic Surgery in India
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Week 4 Term 3 Study Techniques revisited.pptx
01-Introduction-to-Information-Management.pdf
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Renaissance Architecture: A Journey from Faith to Humanism
STATICS OF THE RIGID BODIES Hibbelers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Basic Mud Logging Guide for educational purpose
Institutional Correction lecture only . . .
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Ad

data structure and algorithms arrayby anay.pptx

  • 1. Introduction to Data Structures By :- Anay singh tomar BE cse 3rd sem
  • 2. Data Structures A data structure is a scheme for organizing data in the memory of a computer. Some of the more commonly used data structures include lists, arrays, stacks, queues, heaps, trees, and graphs. Binary Tree
  • 3. The way in which the data is organized affects the performance of a program for different tasks. Computer programmers decide which data structures to use based on the nature of the data and the processes that need to be performed on that data. Binary Tree
  • 4. Example: A Queue A queue is an example of commonly used simple data structure. A queue has beginning and end, called the front and back of the queue. Data enters the queue at one end and leaves at the other. Because of this, data exits the queue in the same order in which it enters the queue, like people in a checkout line at a supermarket.
  • 5. Example: A Binary Tree A binary tree is another commonly used data structure. It is organized like an upside down tree. Each spot on the tree, called a node, holds an item of data along with a left pointer and a right pointer. Binary Tree
  • 6. The pointers are lined up so that the structure forms the upside down tree, with a single node at the top, called the root node, and branches increasing on the left and right as you go down the tree. Binary Tree
  • 7. Choosing Data Structures By comparing the queue with the binary tree, you can see how the structure of the data affects what can be done efficiently with the data.
  • 8. A queue is a good data structure to use for storing things that need to be kept in order, such as a set of documents waiting to be printed on a network printer. .
  • 9. The jobs will be printed in the order in which they are received. Most network print servers maintain such a print queue. .
  • 10. A binary tree is a good data structure to use for searching sorted data. The middle item from the list is stored in the root node, with lesser items to the left and greater items to the right.
  • 11. A search begins at the root. The computer either find the data, or moves left or right, depending on the value for which you are searching. Each move down the tree cuts the remaining data in half.
  • 12. Items can be located very quickly in a tree. Telephone directory assistance information is stored in a tree, so that a name and phone number can be found quickly.
  • 13. For some applications, a queue is the best data structure to use. For others, a binary tree is better. Programmers choose from among many data structures based on how the data will be used by the program.
  • 14. Data Structures in Alice Alice has two built-in data structures that can be used to organize data, or to create other data structures: • Lists • Arrays
  • 15. Lists A list is an ordered set of data. It is often used to store objects that are to be processed sequentially. A list can be used to create a queue.
  • 16. Arrays An array is an indexed set of variables, such as dancer[1], dancer[2], dancer[3],… It is like a set of boxes that hold things. A list is a set of items. An array is a set of variables that each store an item.
  • 17. Arrays and Lists You can see the difference between arrays and lists when you delete items.
  • 18. Arrays and Lists In a list, the missing spot is filled in when something is deleted.
  • 19. In an array, an empty variable is left behind when something is deleted.
  • 20. Lists A list is created in Alice by checking the make a list box when creating a new variable. Make a list box
  • 21. Lists The For all in order and For all together tiles can be used to work with lists. They are at the bottom of the editor area.
  • 22. Arrays Arrays can be created in a similar manner, but more often they are created using the array visualization object from the Alice local gallery. The Array Visualization object has special properties and methods for manipulating the elements in an array.
  • 23. Arrays Alice has a set of built-in functions that can be performed on arrays.

Editor's Notes

  • #14: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #15: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #16: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #17: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #18: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #19: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #20: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #21: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #22: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.
  • #23: The Redo button will reverse the last use of the Undo button, restoring the previous action. The Ctrl-Y keyboard shortcut also can be used in place of the Redo button.