Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
8Activity
0 of .
Results for:
No results containing your search query
P. 1
datastructures lab programs

datastructures lab programs

Ratings:

5.0

(1)
|Views: 1,822|Likes:
Published by suresh

More info:

Published by: suresh on Sep 20, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/10/2014

pdf

text

original

 
DATA STRUCTURES LABORATORY
LIST OF EXPERIMENTS
1)Implement singly and doubly linked lists.2)Represent a polynomial as a linked list and write functions for polynomial addition.3)Implement stack and use it to convert infix to postfix expression4)Implement a double-ended queue (dequeue) where insertion and deletion operations are possible at both the ends.5)Implement an expression tree. Produce its pre-order, in-order, and post-order traversals.6)Implement binary search tree.7)Implement insertion in AVL trees.8)Implement priority queue using binary heaps9)Implement hashing with open addressing.10)Implement Prim's algorithm using priority queues to find MST of an undirected graph.
Total: 45LTPC0032
 
DATA STRUCTURES LABORATORYList of Experiments:1.Singly Linked List.2.Doubly Linked List.3.Polynomial Addition.4.Infix to Postfix Expression.5.Double Ended Queue.6.An Expression Tree.7.Binary Search Tree.8.AVL Tree.9.Priority Queue using Binary Heap.10.Hashing with Open Addressing.11.Prim’s Algorithm.
 
EX:NO:1
a.
SINGLY LINKED LIST IMPLEMENTATIONDATE: AIM:
To implement singly linked list and performing insert, deleteand search operations.
 ALGORITHM:
1.Set a node to contain INFO and LINK fields.2.Allot memory dynamically for a node and declare it as aheader H.3.To create a singly linked lists get the element N andallot memory for a node S1.4.Set S1->INFO=N; and S1->LINK=NULL.5.Repeat the above two steps for all the elements.6.A node can be inserted at the front, in the middle or atthe end of the list.7.To insert a node X at the front check whether the listis empty, if not setX->LINK=H->LINK and H->LINK=X.8.To insert a node X at the end travel till the end of thelist and assign the last node’s LINK value to X.9.To insert a node X after the specified node Y, travelthe list till the node Y is reached. Set X->LINK=Y->LINKand Y->LINK=X10. A node can be deleted at the front, in the middle or atthe end of the list.11.To delete a node X at the front set H->LINK=H->LINK->LINK.12.To delete a node X at the end travel the list till theend and assign the previous to last node’s LINK value tobe NULL.

Activity (8)

You've already reviewed this. Edit your review.
graylds added this note
thanks
graylds liked this
1 hundred reads
Kumit Tanwar liked this
Armin Suljovic liked this
Santoshi Watham liked this
Armin Suljovic liked this
rajaramansuresh liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->