Showing posts with label Data Structure. Show all posts
Showing posts with label Data Structure. Show all posts

Mar 16, 2011

what is a program and programming language?

Program:
Program is a set of well defines instructions, which are tobe process or manipulated for getting predefined and meaningful output.
Programming language:
All computer languages can be classified in the following three broad categories:
(a) Machine language
(b) Assembly language
(c) High level language

Mar 14, 2011

Advantage & Disadvantage of Circular List over Singly linked list

Advantage:


            1.   It is concerned with the accessibility of a node.
            2.   In Circular list every node is accessible from given node.
                   i.e.: -
    From this given node all nodes can be reached by many changing through the list.
3.   It concerns the deletion operation. In singly linked list to delete     desired node, it is necessary to give the address of first node of the list.
4.     This necessity result from the fact that in order to delete desired node. The predecessor of this node has to be found.
5.     To find the predecessor required that a search could be carried out by changing through node from the first node of the list such requirement doesn’t exist for circular list.
 
Disadvantage: 

1.  It is possible that without some care in processing, it is possible to get in to an infinite loop.

Circular Singly Linked List


A singly circular linked list is a linked list in which the last node of the list point to the first node in the list.
          In Circular linked list, we can start at any node in the list & travel the whole list. For this reason we can make our external pointer to the list pointer to any node & still access all the node in the list.

Mar 12, 2011

Doubly Linked List


The Linked list in which each node has two pointers, one to store address of forward link & second to store address of backward link, is called Doubly Linked list.
          The Backward link for point out left most node. & The forward link for point out right most node.