+ All Categories
Home > Documents > Learn Data Structures With Myassignmenthelp.Net

Learn Data Structures With Myassignmenthelp.Net

Date post: 27-Sep-2015
Category:
Upload: stevejohnson
View: 4 times
Download: 0 times
Share this document with a friend
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.
17
www.myassignmenthelp.ne t Data Structures
Transcript
  • Data Structures

    www.myassignmenthelp.net

  • 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.

    www.myassignmenthelp.net

  • algorithmA 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

    www.myassignmenthelp.net

  • 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 conclusionData Structures + Algorithm = Program

    www.myassignmenthelp.net

  • Application of data structureStack ApplicationDirect ApplicationPage-visited history in a Web BrowserUndo sequence in a text editorChain of method calls in the Java Virtual Machine or C++ runtime environment.

    Indirect ApplicationAuxiliary data structure for algorithmcomponent of other data structure

    www.myassignmenthelp.net

  • Application of data structureQueue ApplicationsDirect ApplicationWaiting linesAccess to shared resources (e.g printer)Multiprogramming

    Indirect ApplicationAuxiliary data structure for algorithmsComponent of other data structure

    www.myassignmenthelp.net

  • Classification of data structureLinearIn Linear Data Structure, the data items are arranged in linear sequence. e.g. Array, Stack, Queue, Linked List.

    Non-LinearIn Non-Linear Data items are not in sequence. e.g. Tree, Graph, Heap.

    www.myassignmenthelp.net

  • Classification of data structureHomogeneous In Homogenous data structure, all the elements are of same type e.g. Array

    Non-HomogenousIn Non-Homogenous data structure, the elements may or may not be of same type e.g. Record.

    www.myassignmenthelp.net

  • ArraysArray is basic data structure in which we store data in continues memory locations.Array is variable which holds multiple elements ofsame typeArrays reduce the redundancyGeneric form of arrays:data type array_name[size];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 difficultWaste of memory is very high

    www.myassignmenthelp.net

  • Linked listLinked 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 elementsYour list need to be sorted quickly

    www.myassignmenthelp.net

  • Linked listAdvantages:Memory efficiency is very highInsertion and deletion is very easy and fast

    Disadvantages:Traversal is very slowIf 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 listIf one link is corrupted remain data will be lost

    www.myassignmenthelp.net

  • Double Linked listIn single linked we can move only in one directionDouble 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.

    www.myassignmenthelp.net

  • Double Linked listDisadvantages:Need extra space for holding referencesStill 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.

    www.myassignmenthelp.net

  • Stack

    Stack: New nodes can be added and removed only at the topSimilar to a pile of dishesLast-in, first-out (LIFO)Bottom of stack indicated by a link member to NULLConstrained version of a linked list

    www.myassignmenthelp.net

  • Operations on Stack:PushAdds a new node to the top of the stackPopRemoves a node from the topStores the popped valueReturns true if pop was successful

    www.myassignmenthelp.net

  • QueueQueue:Similar to a supermarket checkout lineFirst-in, first-out (FIFO)Nodes are removed only from the headNodes are inserted only at the tail

    Insert and remove operations:Enqueue (insert) and dequeue (remove)

    www.myassignmenthelp.net

  • Thank You

    www.myassignmenthelp.net

    *www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.netwww.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.netwww.myassignmenthelp.net*www.myassignmenthelp.net*www.myassignmenthelp.net


Recommended