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
You will write functions for both addition and subtraction of two numbers encoded in your data structure. These functions should not be hard to write. Remember how you add and subt

Let us assume a sparse matrix from storage view point. Assume that the entire sparse matrix is stored. Then, a significant amount of memory that stores the matrix consists of zeroe

Binary: Each node has one, zero, or two children. This assertion creates many tree operations efficient and simple. Binary Search : A binary tree where each and every left

HSV Colour Model Instead of a set of colour primaries, the HSV model uses colour descriptions that have a more intuitive appeal to a user. To give a colour specification, a use

Question 1 Explain the following? Arrays Stack Trees Question 2 Explain the Linked list implementation of stack Question 3 What is a binary tree? Expla

Define container in terms of  object-oriented terms A Container is a broad category whose instances are all more specific things; there is never anything which is just a Contai

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

characteristics of a good algorithm

explain the prims''s algorithm with suitable example?

insertion and deletion in a tree