INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
Define : A Procedure or method or recipe  or formula or set of steps that can be used by a computer for the solution of a problem It is a specific set of rules to obtain a definite output from specific inputs provide to the problem WHAT IS ALGORITHM ?
WHAT IS DATA STRUCTURE? 1. A  Data structure  is a particular way of storing and organizing data in a computer. So that it can be used efficiently. 2.  Data structures  deals with the study of methods, techniques and tools to organize or structure data
Different kinds of data structures are suited to different kinds of applications, and some are  highly specialized  to specific tasks.  For example,  B-trees  are particularly well-suited for implementation of  databases , while  compiler  implementations usually use  hash tables  to look up identifiers.
Data structures are used in almost every program or software system. Data structures provide a means to manage huge amounts of data efficiently, such as large databases and internet indexing services.  Usually, efficient data structures are a key to designing efficient algorithms
ABSTRACT DATA TYPES [ADT] WHAT IS DATA TYPES? A data type refers to the type of values that variables in a programming language hold. WHAT IS ADT? Abstract data type refers to the data objects  (refers to the list of elements such as list of integers or list of alphabetical strings)  which comprise the data structure, and their fundamental operations.
An ADT promotes data abstraction and focuses on  what a data structure does  rather than how it does
CLASSIFICATION OF DATA STRUCTURES DATA STRUCTURES Non-Linear Linked Sequential Linear Arrays Stacks Queues Priority queues Linked Lists Linked Stacks Linked Queues Trees Graphs
Linear data structures are unidimensional in structure and represent linear lists. Non-linear data structures are two-dimensional representation of data lists
ARRAYS
WHAT IS ARRAY? An array is an ADT whose objects are  sequence of elements of the same types  and  the two operations performed on it are store and retrieve. STORE(list, i, e) RETRIEVE(list , i  )
TYPES OF ARRAY One-dimensional  A[1:5] Two dimensional B[1:3][1:4] Multi dimensional C[1:3][1:6][1:8]….
STACK
A  stack  is a last in, first out (LIFO) abstract data type and data structure.  A stack can have any abstract data type as an element It is characterized by only  three fundamental operations:  push ,  pop  and  stack top .  The  push operation  adds a new item to the top of the stack, or initializes the stack if it is empty.
If the stack is full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state.  The  pop operation  removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack,  But if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed).
The  stack top operation  gets the data from the top-most position and returns it to the user without deleting it. The same underflow state can also occur in stack top operation if stack is empty.
A stack is a  restricted data structure , because only a small number of operations are performed on it . The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition: therefore, the lower elements are those that have been on the stack the longest.
Implementation of push operation on a stack Procedure PUSH(STACK,n,top,item) if(top=n) then  STACK_FULL; else   { top=top+1; STACK[top]=item;   } end PUSH
Implementation of pop operation on a stack Procedure POP(STACK,top,item) if(top=0) then  STACK_EMPTY; else   { item=STACK[top]; top=top-1;   } end POP
QUESTIONS ?
THANK YOU

Intro ds

  • 1.
    INTRODUCTION TO DATASTRUCTURES AND ALGORITHM
  • 2.
    Define : AProcedure or method or recipe or formula or set of steps that can be used by a computer for the solution of a problem It is a specific set of rules to obtain a definite output from specific inputs provide to the problem WHAT IS ALGORITHM ?
  • 3.
    WHAT IS DATASTRUCTURE? 1. A Data structure is a particular way of storing and organizing data in a computer. So that it can be used efficiently. 2. Data structures deals with the study of methods, techniques and tools to organize or structure data
  • 4.
    Different kinds ofdata structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-trees are particularly well-suited for implementation of databases , while compiler implementations usually use hash tables to look up identifiers.
  • 5.
    Data structures areused in almost every program or software system. Data structures provide a means to manage huge amounts of data efficiently, such as large databases and internet indexing services. Usually, efficient data structures are a key to designing efficient algorithms
  • 6.
    ABSTRACT DATA TYPES[ADT] WHAT IS DATA TYPES? A data type refers to the type of values that variables in a programming language hold. WHAT IS ADT? Abstract data type refers to the data objects (refers to the list of elements such as list of integers or list of alphabetical strings) which comprise the data structure, and their fundamental operations.
  • 7.
    An ADT promotesdata abstraction and focuses on what a data structure does rather than how it does
  • 8.
    CLASSIFICATION OF DATASTRUCTURES DATA STRUCTURES Non-Linear Linked Sequential Linear Arrays Stacks Queues Priority queues Linked Lists Linked Stacks Linked Queues Trees Graphs
  • 9.
    Linear data structuresare unidimensional in structure and represent linear lists. Non-linear data structures are two-dimensional representation of data lists
  • 10.
  • 11.
    WHAT IS ARRAY?An array is an ADT whose objects are sequence of elements of the same types and the two operations performed on it are store and retrieve. STORE(list, i, e) RETRIEVE(list , i )
  • 12.
    TYPES OF ARRAYOne-dimensional A[1:5] Two dimensional B[1:3][1:4] Multi dimensional C[1:3][1:6][1:8]….
  • 13.
  • 14.
    A stack is a last in, first out (LIFO) abstract data type and data structure. A stack can have any abstract data type as an element It is characterized by only three fundamental operations: push , pop and stack top . The push operation adds a new item to the top of the stack, or initializes the stack if it is empty.
  • 15.
    If the stackis full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state. The pop operation removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack, But if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed).
  • 16.
    The stacktop operation gets the data from the top-most position and returns it to the user without deleting it. The same underflow state can also occur in stack top operation if stack is empty.
  • 17.
    A stack isa restricted data structure , because only a small number of operations are performed on it . The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition: therefore, the lower elements are those that have been on the stack the longest.
  • 18.
    Implementation of pushoperation on a stack Procedure PUSH(STACK,n,top,item) if(top=n) then STACK_FULL; else { top=top+1; STACK[top]=item; } end PUSH
  • 19.
    Implementation of popoperation on a stack Procedure POP(STACK,top,item) if(top=0) then STACK_EMPTY; else { item=STACK[top]; top=top-1; } end POP
  • 20.
  • 21.