State algorithm to insert node p at the end of a linked list, Data Structure & Algorithms

 

Algorithm to Insert a Node p at the End of a Linked List is explained below

Step1:   [check for space]

If new1= NULL output "OVERFLOW"

And exit

Step2:   [Allocate free space] New1 = create new node.

Step3:   [Read value of information part of a new

node]

Info[new1]=value

Step4:   [Move the pointer to the end of the list]

node = previous=strt

Repeat while Node != NULL Previous=node

Node = Next[Node]

Step5:   [Link currently created node with the last node of the list]

Next[New1] = Node

Next[Previous] = New1

Step6:   Exit.

Posted Date: 7/13/2012 2:08:33 AM | Location : United States







Related Discussions:- State algorithm to insert node p at the end of a linked list, Assignment Help, Ask Question on State algorithm to insert node p at the end of a linked list, Get Answer, Expert's Help, State algorithm to insert node p at the end of a linked list Discussions

Write discussion on State algorithm to insert node p at the end of a linked list
Your posts are moderated
Related Questions
a) Run your program for α = 0.05, 0.5, and 0.95. You can use n = 30, and W = 10. What is impact of increasing value of α on connectivity of G'? To answer this question, for each v

The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node

lower triangular matrix and upper triangular matrix

Illustrates the program for Binary Search. Program: Binary Search /*Header Files*/ #include #include /*Functions*/ void binary_search(int array[ ], int value,

Gouraud Shading The faceted appearance of a Lambert shaded model is due to each polygon having only a single colour. To avoid this effect, it is necessary to vary the colour ac

Explain about greedy technique The  greedy  method  suggests  constructing  a   solution  to  an  optimization  problem   by  a sequence of steps, every expanding a partially c

An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorithm depends upon following cons

Linear search is not the most efficient way to search an item within a collection of items. Though, it is extremely simple to implement. Furthermore, if the array elements are arra

SPARSE MATRICES Matrices along with good number of zero entries are called sparse matrices. Refer the following matrices of Figure (a)

How can the third dimension be displayed on the screen The main problem in visualization is the display of three-dimensional objects and scenes on two-dimensional screens. How