Introduction to Data Structure


Data Structure is an arrangement of data, either in the computer’s memory or on the disk storage.

Some common examples of data structures include:
  • Arrays
  • Linked lists
  • Queues
  • Stacks
  • Binary trees
  • Hash tables

Types of data structure:
  • Arrays
A collection of similar data elements
Data elements have the same data type

  • Linked Lists
A very dynamic data structure in which the elements can be added to or deleted from anywhere at will
Each element is called a node


  • Queue
The element that was inserted first is the first one to be taken out
The elements in a queue are added at one end called the rear and removed from the other end called the front


  • Stacks
Stacks can be represented as a linear array
Every stack has a variable TOP associated with it
LIFO (Last In First Out) / FILO (First In Last Out)


  • Binary Trees
A data structure which is defined as a collection of elements called the nodes
Every node contains a left pointer, a right pointer, and a data element








Komentar