praveen cse tp

Upload: praveen-kumar-singh

Post on 05-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Praveen Cse Tp

    1/21

    TERM PAPER

    EXPOSURE TO COMPUTER DISCIPLINE

    CSE 102

    Topic: Explain the different operations on different types of datastructures

    DOA:10-02-10

    DOS: 05-05-10

    Submitted to: Submitted by:

    Ms. GEETIKA BHARDWAJ PRAVEEN KUMAR SINGH

    Deptt. CSE/IT Roll. No. A30

    Reg.No. 10905912

    Section: C1903

    ACKNOWLEDGEMENT

  • 8/2/2019 Praveen Cse Tp

    2/21

    As usual large number of people deserves my thanks for the help they provided mefor the preparation for this term paper.

    First of all I would like to thanks my teacher Miss. GEETIKA BHARDWAJ for his supportduring the preparation of this topic . I am very thankful for his guidance.

    I would also like to thanks my friends for the encouragement and information aboutthe topic they provided to me during to me during my effort to prepare this topic.

    INTRODUCTION TO DATA STRUCTURE

    Where structure_name is a name for the structure type, object_name can be a set ofvalid identifiers for objects that have the type of this structure. Within braces { } there is

    a list with the data members, each one is specified with a type and a valid identifier asits name.

    A data structure is a group of data elements grouped together under one name.These data elements, known as members, can have different types and differentlengths.

    where structure_name is a name for the structure type, object_name can be a set ofvalid identifiers for objects that have the type of this structure. Within braces { } there isa list with the data members, each one is specified with a type and a valid identifier as

    its name.

    A data structure creates a new type:

    Once a data structure is declared, a new type with the identifier specified asstructure_name is created and can be used in the rest of the program as if it was anyother type.

    Example:

    struct product {

    int weight;

    float price;

  • 8/2/2019 Praveen Cse Tp

    3/21

    } ;

    product apple;

    product banana, melon;

    Once declared, product has become a new valid type name like the fundamental onesint, char or short and from that point on we are able to declare objects (variables) of thiscompound new type, like we have done with apple, banana and melon.

    Right at the end of the struct declaration, and before the ending semicolon, we can usethe optional field object_name to directly declare objects of the structure type. Forexample, we can also declare the structure objects apple, banana and melon at themoment we define the data structure type this way:

    struct product {

    int weight;

    float price;

    } apple, banana, melon;

    struct structure_name {member_type1 member_name1;member_type2 member_name2;member_type3 member_name3;} object_names;

    In computer science, a data structure is a particular way of storing and organizing

    data in a computerso that it can be used efficiently.[1][2]

    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 compilerimplementations

    usually use hash tables to look up identifiers.

    Data structures are used in almost every program or software system. Specific data

    structures are essential ingredients of many efficient algorithms, and make possible

    the management of huge amounts of data, such as large databases and internet

    indexing services. Some formal design methods and programming languages

    http://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Computerhttp://en.wikipedia.org/wiki/Algorithmic_efficiencyhttp://en.wikipedia.org/wiki/Data_structure#cite_note-0http://en.wikipedia.org/wiki/Data_structure#cite_note-1http://en.wikipedia.org/wiki/B-treehttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Hash_tablehttp://en.wikipedia.org/wiki/Databasehttp://en.wikipedia.org/wiki/Web_indexinghttp://en.wikipedia.org/wiki/Web_indexinghttp://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Computerhttp://en.wikipedia.org/wiki/Algorithmic_efficiencyhttp://en.wikipedia.org/wiki/Data_structure#cite_note-0http://en.wikipedia.org/wiki/Data_structure#cite_note-1http://en.wikipedia.org/wiki/B-treehttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Hash_tablehttp://en.wikipedia.org/wiki/Databasehttp://en.wikipedia.org/wiki/Web_indexinghttp://en.wikipedia.org/wiki/Web_indexinghttp://en.wikipedia.org/wiki/Computer_science
  • 8/2/2019 Praveen Cse Tp

    4/21

    emphasize data structures, rather than algorithms, as the key organizing factor in

    software design.

    List of data structures

    This is a list ofdata structures. For a wider list of terms, see list of terms relating to

    algorithms and data structures. For a comparison of running time of subset of this

    list see comparison of data structures.

    Data types A data type (or datatype) In

    programming, a classification

    identifying one of various types of

    data, as floating-point, integer, or

    Boolean, stating the possible values

    for that type, the operations that can be

    done on that type, and the way the

    values of that type are stored

    Primitive types

    Boolean

    Character

    Integer

    String

    Double

    Float

    Composite types

    Record (also called tuple or struct) Union

    Tagged union (also called a variant, variant record, discriminated union, or

    disjoint union)

    Abstract data types

    Contents

    1 Data types

    o Primitive types

    o Composite types

    o Abstract data types

    2 Linear data structures

    o 2.1 Arrays

    o 2.2 Lists

    3 Trees

    o 3.1 Binary trees

    o 3.2 B-trees

    o 3.3 Heaps

    o 3.4 Trieso 3.5 Multiway trees

    o 3.6 Space-partitioning trees

    o 3.7 Application-specific trees

    4 Hashes

    5 Graphs

    http://en.wikipedia.org/wiki/Data_structurehttp://en.wikipedia.org/wiki/List_of_terms_relating_to_algorithms_and_data_structureshttp://en.wikipedia.org/wiki/List_of_terms_relating_to_algorithms_and_data_structureshttp://en.wikipedia.org/wiki/Comparison_of_data_structureshttp://en.wikipedia.org/wiki/Primitive_typehttp://en.wikipedia.org/wiki/Boolean_datatypehttp://en.wikipedia.org/wiki/Character_(computer_science)http://en.wikipedia.org/wiki/Integer_(computer_science)http://en.wikipedia.org/wiki/String_(computer_science)http://en.wikipedia.org/wiki/Double_precisionhttp://en.wikipedia.org/wiki/IEEE_754http://en.wikipedia.org/wiki/Composite_typehttp://en.wikipedia.org/wiki/Record_(computer_science)http://en.wikipedia.org/wiki/Union_(computer_science)http://en.wikipedia.org/wiki/Tagged_unionhttp://en.wikipedia.org/wiki/Variant_typehttp://en.wikipedia.org/wiki/Abstract_data_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Data_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Primitive_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Composite_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Abstract_data_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Linear_data_structureshttp://en.wikipedia.org/wiki/List_of_data_structures#Arrayshttp://en.wikipedia.org/wiki/List_of_data_structures#Listshttp://en.wikipedia.org/wiki/List_of_data_structures#Treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Binary_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#B-treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Heapshttp://en.wikipedia.org/wiki/List_of_data_structures#Trieshttp://en.wikipedia.org/wiki/List_of_data_structures#Multiway_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Space-partitioning_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Application-specific_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Hasheshttp://en.wikipedia.org/wiki/List_of_data_structures#Graphshttp://en.wikipedia.org/wiki/Data_structurehttp://en.wikipedia.org/wiki/List_of_terms_relating_to_algorithms_and_data_structureshttp://en.wikipedia.org/wiki/List_of_terms_relating_to_algorithms_and_data_structureshttp://en.wikipedia.org/wiki/Comparison_of_data_structureshttp://en.wikipedia.org/wiki/List_of_data_structures#Data_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Primitive_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Composite_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Abstract_data_typeshttp://en.wikipedia.org/wiki/List_of_data_structures#Linear_data_structureshttp://en.wikipedia.org/wiki/List_of_data_structures#Arrayshttp://en.wikipedia.org/wiki/List_of_data_structures#Listshttp://en.wikipedia.org/wiki/List_of_data_structures#Treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Binary_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#B-treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Heapshttp://en.wikipedia.org/wiki/List_of_data_structures#Trieshttp://en.wikipedia.org/wiki/List_of_data_structures#Multiway_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Space-partitioning_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Application-specific_treeshttp://en.wikipedia.org/wiki/List_of_data_structures#Hasheshttp://en.wikipedia.org/wiki/List_of_data_structures#Graphshttp://en.wikipedia.org/wiki/Primitive_typehttp://en.wikipedia.org/wiki/Boolean_datatypehttp://en.wikipedia.org/wiki/Character_(computer_science)http://en.wikipedia.org/wiki/Integer_(computer_science)http://en.wikipedia.org/wiki/String_(computer_science)http://en.wikipedia.org/wiki/Double_precisionhttp://en.wikipedia.org/wiki/IEEE_754http://en.wikipedia.org/wiki/Composite_typehttp://en.wikipedia.org/wiki/Record_(computer_science)http://en.wikipedia.org/wiki/Union_(computer_science)http://en.wikipedia.org/wiki/Tagged_unionhttp://en.wikipedia.org/wiki/Variant_typehttp://en.wikipedia.org/wiki/Abstract_data_types
  • 8/2/2019 Praveen Cse Tp

    5/21

    Container

    Deque

    List

    Map

    Multimap

    Multiset

    Priority queue

    Queue

    Set

    Stack

    String

    Tree

    Some properties of abstract data types:

    Structure Stable Unique Cells per Node

    Bag (multiset) No No 1

    Set No Yes 1

    List Yes No 1

    Map No Yes 2

    "Stable" means that input order is retained. Other structures such as "linked list"

    and "stack" cannot easily be defined this way because there are specific operations

    associated with them.

    Linear arrays:-List of finite number n of homogeneous data elementssuch that:

    1. Elements of array are referenced resp. by an index set consisting of n

    consecutive numbers

    2. Elements of array are stored respectively in successive memory locations

    3. The number n of elements is called the length or size of array

    4. Length or no. of elements can be obtained from index set by formula:-

    5.6. Length =UB-LB+1

    7. UB-Upper Bound i.e largest index

    8. LB-Lower Bound i.e smallest index

    9. If LB=1,then Length=UB

    http://en.wikipedia.org/wiki/List_of_data_structures#Graphshttp://en.wikipedia.org/wiki/Container_(data_structure)http://en.wikipedia.org/wiki/Dequehttp://en.wikipedia.org/wiki/List_(computing)http://en.wikipedia.org/wiki/Associative_arrayhttp://en.wikipedia.org/wiki/Multimaphttp://en.wikipedia.org/wiki/Set_(computer_science)#Multisethttp://en.wikipedia.org/wiki/Priority_queuehttp://en.wikipedia.org/wiki/Queue_(data_structure)http://en.wikipedia.org/wiki/Set_(computer_science)http://en.wikipedia.org/wiki/Stack_(data_structure)http://en.wikipedia.org/wiki/String_(computer_science)http://en.wikipedia.org/wiki/Tree_(computer_science)http://en.wikipedia.org/wiki/Multisethttp://en.wikipedia.org/wiki/Set_(computer_science)http://en.wikipedia.org/wiki/List_(computing)http://en.wikipedia.org/wiki/Associative_arrayhttp://en.wikipedia.org/wiki/Container_(data_structure)http://en.wikipedia.org/wiki/Dequehttp://en.wikipedia.org/wiki/List_(computing)http://en.wikipedia.org/wiki/Associative_arrayhttp://en.wikipedia.org/wiki/Multimaphttp://en.wikipedia.org/wiki/Set_(computer_science)#Multisethttp://en.wikipedia.org/wiki/Priority_queuehttp://en.wikipedia.org/wiki/Queue_(data_structure)http://en.wikipedia.org/wiki/Set_(computer_science)http://en.wikipedia.org/wiki/Stack_(data_structure)http://en.wikipedia.org/wiki/String_(computer_science)http://en.wikipedia.org/wiki/Tree_(computer_science)http://en.wikipedia.org/wiki/Multisethttp://en.wikipedia.org/wiki/Set_(computer_science)http://en.wikipedia.org/wiki/List_(computing)http://en.wikipedia.org/wiki/Associative_array
  • 8/2/2019 Praveen Cse Tp

    6/21

    Stack:-It is also called last-in-first-out(LIFO) system It is a linear list where insertions and deletions can take place at one end

    called top

    2 operations:- Push-To insert an element on top of stack Pop-To delete an element from top of stack

    Example of stack:-

    typedef struct stack_Rep stack_Rep; /* Type: instance representation (an opaque record). */

    typedefstack_Rep *stack_T; /* Type: handle to a stack instance (an opaque pointer). */

    typedefvoid *stack_Item; /* Type: value that can be stored in stack (arbitrary address). */

    stack_T stack_create(void); /* Create new stack instance, initially empty. */

    void stack_push(stack_T s, stack_Item e); /* Add an item at the top of the stack. */

    stack_Item stack_pop(stack_T s); /* Remove the top item from the stack and return it . */

    int stack_empty(stack_T ts); /* Check whether stack is empty. */

    This implementation could be used in the following manner:

    #include /* Include the stack interface. */

    stack_T t = stack_create(); /* Create a stack instance. */

    int foo = 17; /* An arbitrary datum. */

    t = stack_push(t, &foo); /* Push the address of 'foo' onto the stack. */

    void *e = stack_pop(t); /* Get the top item and delete it from the stack. */

    if(stack_empty(t)) { } /* Do something if stack is empty. */

    typedef struct stack_Rep stack_Rep; /* Type: stack state representation (an opaquerecord). */

    typedefstack_Rep *stack_T; /* Type: handle to a stack state (an opaque pointer). */

    typedefvoid *stack_Item; /* Type: item (arbitrary address). */

    stack_T stack_empty(void); /* Returns the empty stack state. */

    stack_T stack_push(stack_T s, stack_Item x); /* Adds x at the top of s, returns theresulting state. */

    stack_Item stack_top(stack_T s); /* Returns the item currently at the top of s. */

  • 8/2/2019 Praveen Cse Tp

    7/21

    stack_T stack_pop(stack_T s); /* Remove the top item from s, returns the resulting state.*/

    Linked List:-It is a linear collection of data elements called nodes.Linear order is maintained by pointers

    3 types of linked list:-

    1. Linear

    2. Doubly

    3. Circular

    Linear linked list

    Each node is divided into 2 parts:-

    1. It contains information of element

    2. It is called link field/next field pointer contains address of next node in the

    list

    3. Another pointer variable called head contains address of first element

    4. Last element of linked list has NULL value

    Doubly Linked List

    Each node is divided into 3 parts:-

    1. It contains information of element

    2. It is called previous pointer field pointer contains address of preceding

    element in the list

    3. It is called next pointer field pointer contains address of succeeding elementin the list

    Example of link list:-

    typedef struct {

    int size;

  • 8/2/2019 Praveen Cse Tp

    8/21

    int items[STACKSIZE];

    } STACK;

    void push(STACK *ps, int x)

    {

    if(ps->size == STACKSIZE) {

    fputs("Error: stack overflow\n", stderr);

    abort();

    } else

    ps->items[ps->size++] = x;

    }

    int pop(STACK *ps)

    {

    if(ps->size == 0){

    fputs("Error: stack underflow\n", stderr);

    abort();

    } else

    return ps->items[--ps->size];

    }

    typedef struct stack {

    int data;

    struct stack *next;

    } STACK;

    void push(STACK **head, int value)

    {

    STACK *node = malloc(sizeof(STACK)); /* create a new node */

    if(node == NULL){

    fputs("Error: no space available for node\n", stderr);

    abort();

  • 8/2/2019 Praveen Cse Tp

    9/21

    } else { /* initialize node */

    node->data = value;

    node->next = empty(*head) ? NULL : *head; /* insert new head if any */

    *head = node;

    }

    }

    int pop(STACK **head)

    {

    if(empty(*head)) { /* stack is empty*/

    fputs("Error: stack underflow\n", stderr);

    abort();

    } else { /* pop a node */

    STACK *top = *head;

    int value = top->data;

    *head = top->next;

    free(top);

    return value;

    }

    #include

    int main()

    Stack 29

    {

    int a[100], i;

    printf("To pop enter -1\n");

    for(i = 0;;)

    {

    printf("Push ");

    scanf("%d", &a[i]);

  • 8/2/2019 Praveen Cse Tp

    10/21

    if(a[i] == -1)

    {

    if(i == 0)

    {

    printf("Underflow\n");

    }

    else

    {

    printf("pop = %d\n", a[--i]);

    }

    }

    else

    {

    i++;

    }

    }

    }

    Example (Pascal)

    This is an implementation in Pascal, using marked sequential file as data archives.

    {

    programmer : clx321

    file : stack.pas

    unit : Pstack.tpu

    }

    program TestStack;

    {this program use ADT of Stack, i will assume that the unit of ADT of

    Stack has already existed}

    uses

    PStack; {ADT of STACK}

    {dictionary}

  • 8/2/2019 Praveen Cse Tp

    11/21

    const

    mark = '.';

    var

    data : stack;

    f : text;

    cc : char;

    Stack 30

    ccInt, cc1, cc2 : integer;

    {functions}

    IsOperand (cc : char) : boolean; {JUST Prototype}

    {return TRUE if cc is operand}

    ChrToInt (cc : char) : integer; {JUST Prototype}

    {change char to integer}

    Operator (cc1, cc2 : integer) : integer; {JUST Prototype}

    {operate two operands}

    {algorithms}

    begin

    assign (f, cc);

    reset (f);

    read (f, cc); {first elmt}

    if(cc = mark) then

    begin

    writeln ('empty archives !');

    end

    else

    begin

    repeat

    if(IsOperand (cc)) then

    begin

    ccInt := ChrToInt (cc);

  • 8/2/2019 Praveen Cse Tp

    12/21

    push (ccInt, data);

    end

    else

    begin

    pop (cc1, data);

    pop (cc2, data);

    push (data, Operator (cc2, cc1));

    end;

    read (f, cc); {next elmt}

    until (cc = mark);

    end;

    close (f);

    end.

    Queues:-It is also called First in First out(FIFO) A linear list in which insertions can take place at one end of the list called

    rear of list

    deletions can take place at other end of the list called front of list

    A queue is an example of commonly used simple data structure. A queue

    has beginning and end, called thefrontand backof 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 C Program

    #include

    int main(){

    int a[100],i,j;

    printf("To DQueue Enter -1\n");

    for(i=0;;){

  • 8/2/2019 Praveen Cse Tp

    13/21

    printf("NQueue ");

    scanf("%d",&a[i]);

    if(a[i]==0)

    break;

    if(a[i]==-1){

    a[i]=0;

    if(i==0){

    printf("Wrong\n");

    continue;

    }

    printf("DQueue = %d\n",a[0]);

    for(j=0;j

  • 8/2/2019 Praveen Cse Tp

    14/21

    key:integer;

    end;

    var

    U:integer;

    tail,Head:link;

    procedure queinit; // Initializes the queue

    begin

    New(tail);

    tail^.next:=nil;

    head:=tail;

    end;

    procedure put(u: integer); // Puts number u into the queue

    var

    t: link;

    begin

    New(t);

    tail^.key := u;

    tail^.next := t;

    tail := t;

    end;

    function pop:integer; //Pops one number at a time

    var

    s:link;

    begin

    pop:=head^.key;

    s:=head;

    head:=head^.next;

    dispose(s);

    end;

    function empty:boolean;//checks if the queue is empty

  • 8/2/2019 Praveen Cse Tp

    15/21

    begin

    empty:=head=tail;

    end;

    begin

    queinit;

    u := 1;

    put(u); // Put 1 in the queue

    u := 2;

    Queue 36

    Trees:-A tree T is defied as finite set of elements called nodes Either T is empty called null tree or empty tree T contains a distinguished node R called root of T and remaining nodes form

    an ordered pair of binary tress T1 and T2

    Lists:-A list is an ordered set of data. It is often used to store objects that are to beprocessed sequentially.

    A list can be used to create a queue.

    Linear data structures

    Arrays

    Array

    Bit field

    Bit array

    Bitboard

    Bitmaps

    Images

    Dynamic array

    http://en.wikipedia.org/wiki/Array_data_structurehttp://en.wikipedia.org/wiki/Bit_fieldhttp://en.wikipedia.org/wiki/Bit_arrayhttp://en.wikipedia.org/wiki/Bitboardhttp://en.wikipedia.org/wiki/Bitmapshttp://en.wikipedia.org/wiki/Digital_imagehttp://en.wikipedia.org/wiki/Dynamic_arrayhttp://en.wikipedia.org/wiki/Array_data_structurehttp://en.wikipedia.org/wiki/Bit_fieldhttp://en.wikipedia.org/wiki/Bit_arrayhttp://en.wikipedia.org/wiki/Bitboardhttp://en.wikipedia.org/wiki/Bitmapshttp://en.wikipedia.org/wiki/Digital_imagehttp://en.wikipedia.org/wiki/Dynamic_array
  • 8/2/2019 Praveen Cse Tp

    16/21

    Circular buffer

    Control table

    Gap Buffer

    Hashed array tree

    Heightfields

    Lookup table

    Matrix

    Parallel array

    Sparse array

    Sparse matrix

    Links:-Links between the entities are expressed using the indexes of objects in arrays.

    Lists

    Linked list

    Doubly linked list

    Xor linked list

    http://en.wikipedia.org/wiki/Dynamic_arrayhttp://en.wikipedia.org/wiki/Circular_bufferhttp://en.wikipedia.org/wiki/Control_tablehttp://en.wikipedia.org/wiki/Gap_bufferhttp://en.wikipedia.org/wiki/Hashed_array_treehttp://en.wikipedia.org/wiki/Heightfieldshttp://en.wikipedia.org/wiki/Lookup_tablehttp://en.wikipedia.org/wiki/Matrix_(computer_science)http://en.wikipedia.org/wiki/Parallel_arrayhttp://en.wikipedia.org/wiki/Sparse_arrayhttp://en.wikipedia.org/wiki/Sparse_matrixhttp://en.wikipedia.org/wiki/Linked_listhttp://en.wikipedia.org/wiki/Doubly_linked_listhttp://en.wikipedia.org/wiki/Xor_linked_listhttp://en.wikipedia.org/wiki/Circular_bufferhttp://en.wikipedia.org/wiki/Control_tablehttp://en.wikipedia.org/wiki/Gap_bufferhttp://en.wikipedia.org/wiki/Hashed_array_treehttp://en.wikipedia.org/wiki/Heightfieldshttp://en.wikipedia.org/wiki/Lookup_tablehttp://en.wikipedia.org/wiki/Matrix_(computer_science)http://en.wikipedia.org/wiki/Parallel_arrayhttp://en.wikipedia.org/wiki/Sparse_arrayhttp://en.wikipedia.org/wiki/Sparse_matrixhttp://en.wikipedia.org/wiki/Linked_listhttp://en.wikipedia.org/wiki/Doubly_linked_listhttp://en.wikipedia.org/wiki/Xor_linked_list
  • 8/2/2019 Praveen Cse Tp

    17/21

    Unrolled linked list

    Zipper

    Vlist

    Skip list

    Jump list

    Self-organizing list

    Trees

    Binary trees

    Binary tree

    Binary search tree

    Self-balancing binary search tree

    Randomized binary search tree Weight-balanced tree

    Threaded binary tree

    AVL tree

    Red-black tree

    AA tree

    Scapegoat tree

    Splay tree

    T-tree

    Rope

    Top Trees Tango Trees

    Cartesian tree

    Van Emde Boas tree

    Treap

    B-trees

    B-tree

    B+ tree

    B*-tree

    B sharp tree

    Dancing tree

    2-3 tree

    2-3-4 tree

    Queaps

    http://en.wikipedia.org/wiki/Xor_linked_listhttp://en.wikipedia.org/wiki/Unrolled_linked_listhttp://en.wikipedia.org/wiki/Zipper_(data_structure)http://en.wikipedia.org/wiki/VListhttp://en.wikipedia.org/wiki/Skip_listhttp://en.wikipedia.org/wiki/Jump_listhttp://en.wikipedia.org/wiki/Self-organizing_listhttp://en.wikipedia.org/wiki/Binary_treehttp://en.wikipedia.org/wiki/Binary_search_treehttp://en.wikipedia.org/wiki/Self-balancing_binary_search_treehttp://en.wikipedia.org/wiki/Randomized_binary_search_treehttp://en.wikipedia.org/wiki/Weight-balanced_treehttp://en.wikipedia.org/wiki/Threaded_binary_treehttp://en.wikipedia.org/wiki/AVL_treehttp://en.wikipedia.org/wiki/Red-black_treehttp://en.wikipedia.org/wiki/AA_treehttp://en.wikipedia.org/wiki/Scapegoat_treehttp://en.wikipedia.org/wiki/Splay_treehttp://en.wikipedia.org/wiki/T-treehttp://en.wikipedia.org/wiki/Rope_(computer_science)http://en.wikipedia.org/wiki/Top_Treeshttp://en.wikipedia.org/wiki/Tango_Treeshttp://en.wikipedia.org/wiki/Cartesian_treehttp://en.wikipedia.org/wiki/Van_Emde_Boas_treehttp://en.wikipedia.org/wiki/Treaphttp://en.wikipedia.org/wiki/B-treehttp://en.wikipedia.org/wiki/B%2B_treehttp://en.wikipedia.org/wiki/B*-treehttp://en.wikipedia.org/wiki/B_sharp_treehttp://en.wikipedia.org/wiki/Dancing_treehttp://en.wikipedia.org/wiki/2-3_treehttp://en.wikipedia.org/wiki/2-3-4_treehttp://en.wikipedia.org/wiki/Queapshttp://en.wikipedia.org/wiki/Unrolled_linked_listhttp://en.wikipedia.org/wiki/Zipper_(data_structure)http://en.wikipedia.org/wiki/VListhttp://en.wikipedia.org/wiki/Skip_listhttp://en.wikipedia.org/wiki/Jump_listhttp://en.wikipedia.org/wiki/Self-organizing_listhttp://en.wikipedia.org/wiki/Binary_treehttp://en.wikipedia.org/wiki/Binary_search_treehttp://en.wikipedia.org/wiki/Self-balancing_binary_search_treehttp://en.wikipedia.org/wiki/Randomized_binary_search_treehttp://en.wikipedia.org/wiki/Weight-balanced_treehttp://en.wikipedia.org/wiki/Threaded_binary_treehttp://en.wikipedia.org/wiki/AVL_treehttp://en.wikipedia.org/wiki/Red-black_treehttp://en.wikipedia.org/wiki/AA_treehttp://en.wikipedia.org/wiki/Scapegoat_treehttp://en.wikipedia.org/wiki/Splay_treehttp://en.wikipedia.org/wiki/T-treehttp://en.wikipedia.org/wiki/Rope_(computer_science)http://en.wikipedia.org/wiki/Top_Treeshttp://en.wikipedia.org/wiki/Tango_Treeshttp://en.wikipedia.org/wiki/Cartesian_treehttp://en.wikipedia.org/wiki/Van_Emde_Boas_treehttp://en.wikipedia.org/wiki/Treaphttp://en.wikipedia.org/wiki/B-treehttp://en.wikipedia.org/wiki/B%2B_treehttp://en.wikipedia.org/wiki/B*-treehttp://en.wikipedia.org/wiki/B_sharp_treehttp://en.wikipedia.org/wiki/Dancing_treehttp://en.wikipedia.org/wiki/2-3_treehttp://en.wikipedia.org/wiki/2-3-4_treehttp://en.wikipedia.org/wiki/Queaps
  • 8/2/2019 Praveen Cse Tp

    18/21

    Fusion tree

    Bx-tree

    Heaps

    Heap Binary heap

    Binomial heap

    Fibonacci heap

    2-3 heap

    Soft heap

    Pairing heap

    Leftist heap

    Treap

    Beap Skew heap

    Ternary heap

    D-ary heap

    Tries

    In these data structures each tree node compares a bit slice of key values.

    Trie

    Radix tree Suffix tree

    Suffix array

    Compressed suffix array

    FM-index

    Generalised suffix tree

    B-trie

    Judy array

    Multiway trees

    Ternary search tree

    Andor tree

    (a,b)-tree

    Link/cut tree

    SPQR-tree

    Spaghetti stack

    http://en.wikipedia.org/wiki/Queapshttp://en.wikipedia.org/wiki/Fusion_treehttp://en.wikipedia.org/wiki/Bx-tree_Moving_Object_Indexhttp://en.wikipedia.org/wiki/Heap_(data_structure)http://en.wikipedia.org/wiki/Binary_heaphttp://en.wikipedia.org/wiki/Binomial_heaphttp://en.wikipedia.org/wiki/Fibonacci_heaphttp://en.wikipedia.org/wiki/2-3_heaphttp://en.wikipedia.org/wiki/Soft_heaphttp://en.wikipedia.org/wiki/Pairing_heaphttp://en.wikipedia.org/wiki/Leftist_treehttp://en.wikipedia.org/wiki/Treaphttp://en.wikipedia.org/wiki/Beaphttp://en.wikipedia.org/wiki/Skew_heaphttp://en.wikipedia.org/wiki/Ternary_heaphttp://en.wikipedia.org/wiki/D-ary_heaphttp://en.wikipedia.org/wiki/Triehttp://en.wikipedia.org/wiki/Radix_treehttp://en.wikipedia.org/wiki/Suffix_treehttp://en.wikipedia.org/wiki/Suffix_arrayhttp://en.wikipedia.org/wiki/Compressed_suffix_arrayhttp://en.wikipedia.org/wiki/FM-indexhttp://en.wikipedia.org/wiki/Generalised_suffix_treehttp://en.wikipedia.org/wiki/B-triehttp://en.wikipedia.org/wiki/Judy_arrayhttp://en.wikipedia.org/wiki/Ternary_search_treehttp://en.wikipedia.org/wiki/And%E2%80%93or_treehttp://en.wikipedia.org/wiki/(a,b)-treehttp://en.wikipedia.org/wiki/Link/cut_treehttp://en.wikipedia.org/wiki/SPQR-treehttp://en.wikipedia.org/wiki/Spaghetti_stackhttp://en.wikipedia.org/wiki/Fusion_treehttp://en.wikipedia.org/wiki/Bx-tree_Moving_Object_Indexhttp://en.wikipedia.org/wiki/Heap_(data_structure)http://en.wikipedia.org/wiki/Binary_heaphttp://en.wikipedia.org/wiki/Binomial_heaphttp://en.wikipedia.org/wiki/Fibonacci_heaphttp://en.wikipedia.org/wiki/2-3_heaphttp://en.wikipedia.org/wiki/Soft_heaphttp://en.wikipedia.org/wiki/Pairing_heaphttp://en.wikipedia.org/wiki/Leftist_treehttp://en.wikipedia.org/wiki/Treaphttp://en.wikipedia.org/wiki/Beaphttp://en.wikipedia.org/wiki/Skew_heaphttp://en.wikipedia.org/wiki/Ternary_heaphttp://en.wikipedia.org/wiki/D-ary_heaphttp://en.wikipedia.org/wiki/Triehttp://en.wikipedia.org/wiki/Radix_treehttp://en.wikipedia.org/wiki/Suffix_treehttp://en.wikipedia.org/wiki/Suffix_arrayhttp://en.wikipedia.org/wiki/Compressed_suffix_arrayhttp://en.wikipedia.org/wiki/FM-indexhttp://en.wikipedia.org/wiki/Generalised_suffix_treehttp://en.wikipedia.org/wiki/B-triehttp://en.wikipedia.org/wiki/Judy_arrayhttp://en.wikipedia.org/wiki/Ternary_search_treehttp://en.wikipedia.org/wiki/And%E2%80%93or_treehttp://en.wikipedia.org/wiki/(a,b)-treehttp://en.wikipedia.org/wiki/Link/cut_treehttp://en.wikipedia.org/wiki/SPQR-treehttp://en.wikipedia.org/wiki/Spaghetti_stack
  • 8/2/2019 Praveen Cse Tp

    19/21

    Disjoint-set data structure

    Fusion tree

    Enfilade

    Exponential tree

    Fenwick tree

    Space-partitioning trees

    This is data structures used forspace partitioning orbinary space partitioning.

    Segment tree

    Interval tree

    Range tree

    Bin

    Kd-tree Implicit kd-tree

    Min/max kd-tree

    Adaptive k-d tree

    Kdb tree

    Quadtree

    Octree

    Linear octrees

    Z-order

    UB-tree

    R-tree R+ tree

    R* tree

    Hilbert R-tree

    X-tree

    Metric tree

    Cover tree

    M tree

    VP-tree

    BK-tree Bounding interval hierarchy

    BSP tree

    Application-specific trees

    Syntax tree

    http://en.wikipedia.org/wiki/Spaghetti_stackhttp://en.wikipedia.org/wiki/Disjoint-set_data_structurehttp://en.wikipedia.org/wiki/Fusion_treehttp://en.wikipedia.org/wiki/Enfilade_(Xanadu)http://en.wikipedia.org/wiki/Exponential_treehttp://en.wikipedia.org/wiki/Fenwick_treehttp://en.wikipedia.org/wiki/Space_partitioninghttp://en.wikipedia.org/wiki/Binary_space_partitioninghttp://en.wikipedia.org/wiki/Segment_treehttp://en.wikipedia.org/wiki/Interval_treehttp://en.wikipedia.org/wiki/Range_treehttp://en.wikipedia.org/wiki/Bin_(computational_geometry)http://en.wikipedia.org/wiki/Kd-treehttp://en.wikipedia.org/wiki/Implicit_kd-treehttp://en.wikipedia.org/wiki/Min/max_kd-treehttp://en.wikipedia.org/wiki/Adaptive_k-d_treehttp://en.wikipedia.org/w/index.php?title=Kdb_tree&action=edit&redlink=1http://en.wikipedia.org/wiki/Quadtreehttp://en.wikipedia.org/wiki/Octreehttp://en.wikipedia.org/wiki/Linear_octreeshttp://en.wikipedia.org/wiki/Z-order_(curve)http://en.wikipedia.org/wiki/UB-treehttp://en.wikipedia.org/wiki/R-treehttp://en.wikipedia.org/wiki/R%2B_treehttp://en.wikipedia.org/wiki/R*_treehttp://en.wikipedia.org/wiki/Hilbert_R-treehttp://en.wikipedia.org/wiki/X-treehttp://en.wikipedia.org/wiki/Metric_treehttp://en.wikipedia.org/wiki/Cover_treehttp://en.wikipedia.org/w/index.php?title=M_tree&action=edit&redlink=1http://en.wikipedia.org/wiki/VP-treehttp://en.wikipedia.org/wiki/BK-treehttp://en.wikipedia.org/wiki/Bounding_interval_hierarchyhttp://en.wikipedia.org/wiki/BSP_treehttp://en.wikipedia.org/wiki/Syntax_treehttp://en.wikipedia.org/wiki/Disjoint-set_data_structurehttp://en.wikipedia.org/wiki/Fusion_treehttp://en.wikipedia.org/wiki/Enfilade_(Xanadu)http://en.wikipedia.org/wiki/Exponential_treehttp://en.wikipedia.org/wiki/Fenwick_treehttp://en.wikipedia.org/wiki/Space_partitioninghttp://en.wikipedia.org/wiki/Binary_space_partitioninghttp://en.wikipedia.org/wiki/Segment_treehttp://en.wikipedia.org/wiki/Interval_treehttp://en.wikipedia.org/wiki/Range_treehttp://en.wikipedia.org/wiki/Bin_(computational_geometry)http://en.wikipedia.org/wiki/Kd-treehttp://en.wikipedia.org/wiki/Implicit_kd-treehttp://en.wikipedia.org/wiki/Min/max_kd-treehttp://en.wikipedia.org/wiki/Adaptive_k-d_treehttp://en.wikipedia.org/w/index.php?title=Kdb_tree&action=edit&redlink=1http://en.wikipedia.org/wiki/Quadtreehttp://en.wikipedia.org/wiki/Octreehttp://en.wikipedia.org/wiki/Linear_octreeshttp://en.wikipedia.org/wiki/Z-order_(curve)http://en.wikipedia.org/wiki/UB-treehttp://en.wikipedia.org/wiki/R-treehttp://en.wikipedia.org/wiki/R%2B_treehttp://en.wikipedia.org/wiki/R*_treehttp://en.wikipedia.org/wiki/Hilbert_R-treehttp://en.wikipedia.org/wiki/X-treehttp://en.wikipedia.org/wiki/Metric_treehttp://en.wikipedia.org/wiki/Cover_treehttp://en.wikipedia.org/w/index.php?title=M_tree&action=edit&redlink=1http://en.wikipedia.org/wiki/VP-treehttp://en.wikipedia.org/wiki/BK-treehttp://en.wikipedia.org/wiki/Bounding_interval_hierarchyhttp://en.wikipedia.org/wiki/BSP_treehttp://en.wikipedia.org/wiki/Syntax_tree
  • 8/2/2019 Praveen Cse Tp

    20/21

    Abstract syntax tree

    Parse tree

    Decision tree

    Alternating decision tree

    Minimax tree

    Expectiminimax tree

    Finger tree

    Hashes

    Hash table

    Bloom filter

    Hash list

    Hash tree

    Prefix hash tree Hash trie

    Hash array mapped trie

    Distributed hash table

    Koorde

    Graphs

    Graph

    Adjacency list

    Adjacency matrix Graph-structured stack

    Scene graph

    Binary decision diagram

    Zero suppressed decision diagram

    And-inverter graph

    Propositional directed acyclic graph

    References

    1. R.S. SALARIA Data structure2. Dinesh Metha and Sartaj SahniHandbook of Data Structures and

    Applications,3. Alfred V. Aho, Jeffrey D. Ullman, John E. Hopcroft. Data Structures and

    Algorithms. Addison Wesley, 1983.

    http://en.wikipedia.org/wiki/Syntax_treehttp://en.wikipedia.org/wiki/Abstract_syntax_treehttp://en.wikipedia.org/wiki/Parse_treehttp://en.wikipedia.org/wiki/Decision_treehttp://en.wikipedia.org/wiki/Alternating_decision_treehttp://en.wikipedia.org/wiki/Minmaxhttp://en.wikipedia.org/wiki/Expectiminimax_treehttp://en.wikipedia.org/wiki/Finger_treehttp://en.wikipedia.org/wiki/Hash_tablehttp://en.wikipedia.org/wiki/Bloom_filterhttp://en.wikipedia.org/wiki/Hash_listhttp://en.wikipedia.org/wiki/Hash_treehttp://en.wikipedia.org/wiki/Prefix_hash_treehttp://en.wikipedia.org/wiki/Hash_triehttp://en.wikipedia.org/wiki/Hash_array_mapped_triehttp://en.wikipedia.org/wiki/Distributed_hash_tablehttp://en.wikipedia.org/wiki/Koordehttp://en.wikipedia.org/wiki/Graph_(data_structure)http://en.wikipedia.org/wiki/Adjacency_listhttp://en.wikipedia.org/wiki/Adjacency_matrixhttp://en.wikipedia.org/wiki/Graph-structured_stackhttp://en.wikipedia.org/wiki/Scene_graphhttp://en.wikipedia.org/wiki/Binary_decision_diagramhttp://en.wikipedia.org/wiki/Zero_suppressed_decision_diagramhttp://en.wikipedia.org/wiki/And-inverter_graphhttp://en.wikipedia.org/wiki/Propositional_directed_acyclic_graphhttp://en.wikipedia.org/wiki/Sartaj_Sahnihttp://en.wikipedia.org/wiki/Abstract_syntax_treehttp://en.wikipedia.org/wiki/Parse_treehttp://en.wikipedia.org/wiki/Decision_treehttp://en.wikipedia.org/wiki/Alternating_decision_treehttp://en.wikipedia.org/wiki/Minmaxhttp://en.wikipedia.org/wiki/Expectiminimax_treehttp://en.wikipedia.org/wiki/Finger_treehttp://en.wikipedia.org/wiki/Hash_tablehttp://en.wikipedia.org/wiki/Bloom_filterhttp://en.wikipedia.org/wiki/Hash_listhttp://en.wikipedia.org/wiki/Hash_treehttp://en.wikipedia.org/wiki/Prefix_hash_treehttp://en.wikipedia.org/wiki/Hash_triehttp://en.wikipedia.org/wiki/Hash_array_mapped_triehttp://en.wikipedia.org/wiki/Distributed_hash_tablehttp://en.wikipedia.org/wiki/Koordehttp://en.wikipedia.org/wiki/Graph_(data_structure)http://en.wikipedia.org/wiki/Adjacency_listhttp://en.wikipedia.org/wiki/Adjacency_matrixhttp://en.wikipedia.org/wiki/Graph-structured_stackhttp://en.wikipedia.org/wiki/Scene_graphhttp://en.wikipedia.org/wiki/Binary_decision_diagramhttp://en.wikipedia.org/wiki/Zero_suppressed_decision_diagramhttp://en.wikipedia.org/wiki/And-inverter_graphhttp://en.wikipedia.org/wiki/Propositional_directed_acyclic_graphhttp://en.wikipedia.org/wiki/Sartaj_Sahni
  • 8/2/2019 Praveen Cse Tp

    21/21

    4. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein.Introduction to Algorithms. McGraw-Hill, 2001.

    5. Donald E. Knuth. The Art of Computer Programming, Volumes 1-3.Addison-Wesley Professional, 1998.