Learn Data Structures With Myassignmenthelp.Net - PowerPoint PPT Presentation

About This Presentation
Title:

Learn Data Structures With Myassignmenthelp.Net

Description:

Data Structures is an Integrated and most Important part of the programming. Every Programmer should have a knowledge of data structure in order to be a successfull programmer. So for the convenience of the programming aspirants www.myassignmenthelp.net offers an Online Tutoring and Online Assignment Help where Anyone who wants to learn data structures or wants to get their problem solved can send their request and myassignmenthelp.net will provide the solutions before the deadline given. – PowerPoint PPT presentation

Number of Views:68
Slides: 18
Provided by: myassignmenthelpnet
Category:

less

Transcript and Presenter's Notes

Title: Learn Data Structures With Myassignmenthelp.Net


1
Data Structures
2
Introduction
  • Data Structure is a way to store and organize
    data in the structured manner. Computer's memory
    is divided into small parts, we use different
    data structures to store data in those small
    blocks. Example Arrays, Linked list, Trees etc
  • A means of storing a collection of data.

3
algorithm
  • A systematic method of instructing an agent how
    to accomplish a task.
  • Usually expressed in a step-wise sequential form.
  • May involve alternation, iteration or recursion
  • Detail and language may depend on the agent

4
Data structure and algorithm Algorithms are part
of what constitutes a data structures. In
constructing a solution to a problem, a data
structure must be chosen that allows the data to
be operated upon easily in the manner required by
the algorithm. In conclusion Data Structures
Algorithm Program
5
Application of data structure
  • Stack Application
  • Direct Application
  • Page-visited history in a Web Browser
  • Undo sequence in a text editor
  • Chain of method calls in the Java Virtual Machine
    or C runtime environment.
  • Indirect Application
  • Auxiliary data structure for algorithm
  • component of other data structure

6
Application of data structure
  • Queue Applications
  • Direct Application
  • Waiting lines
  • Access to shared resources (e.g printer)
  • Multiprogramming
  • Indirect Application
  • Auxiliary data structure for algorithms
  • Component of other data structure

7
Classification of data structure
  • Linear
  • In Linear Data Structure, the data items are
    arranged in linear sequence. e.g. Array, Stack,
    Queue, Linked List.
  • Non-Linear
  • In Non-Linear Data items are not in sequence.
    e.g. Tree, Graph, Heap.

8
Classification of data structure
  • Homogeneous
  • In Homogenous data structure, all the elements
    are of same type e.g. Array
  • Non-Homogenous
  • In Non-Homogenous data structure, the elements
    may or may not be of same type e.g. Record.

9
Arrays
  • Array is basic data structure in which we store
    data in continues memory locations.
  • Array is variable which holds multiple elements
    of same type
  • Arrays reduce the redundancy
  • Generic form of arrays
  • data type array_namesize
  • Data type what type of data(int, float, char...)
  • Size number elements you want to store
  • Disadvantages
  • Capable of holding only one type of elements.
  • Insertion and deletion is very difficult
  • Waste of memory is very high

10
Linked list
  • Linked List
  • Collection of nodes which or connected together
  • Node
  • Is just like variable but it holds data and
    address of the next node or null
  • When linked list is useful
  • Do not know the number of data elements
  • Your list need to be sorted quickly

11
Linked list
  • Advantages
  • Memory efficiency is very high
  • Insertion and deletion is very easy and fast
  • Disadvantages
  • Traversal is very slow
  • If you want to access 10th element in the list
    you need to cross 9 elements (arrays are very
    fast because of index)
  • You can move only in one direction in single
    linked list
  • If one link is corrupted remain data will be lost

12
Double Linked list
  • In single linked we can move only in one
    direction
  • Double linked list allow us to move in direction.
  • Double linked is also collection of nodes, but
    here node is contains more than 2 fields.
  • Node one field holds data, second field holds
    address of next node or null and third field
    holds address of previous node or null.

13
Double Linked list
  • Disadvantages
  • Need extra space for holding references
  • Still it is very slow to travel across the list
  • Circular linked list
  • If the head of linked list is connected to tail
    that listis called circular linked list.
  • Application of linked list
  • Stacks and Queues.

14
Stack
  • Stack
  • New nodes can be added and removed only at the
    top
  • Similar to a pile of dishes
  • Last-in, first-out (LIFO)
  • Bottom of stack indicated by a link member to
    NULL
  • Constrained version of a linked list

15
  • Operations on Stack
  • Push
  • Adds a new node to the top of the stack
  • Pop
  • Removes a node from the top
  • Stores the popped value
  • Returns true if  pop was successful

16
Queue
  • Queue
  • Similar to a supermarket checkout line
  • First-in, first-out (FIFO)
  • Nodes are removed only from the head
  • Nodes are inserted only at the tail
  • Insert and remove operations
  • Enqueue (insert) and dequeue (remove)

17
Thank
You
Write a Comment
User Comments (0)
About PowerShow.com