CS 2208 DATA STRUCTURES LAB 0 0 3 2 AIM: To develop programming skills in design and implementation of data structures and their applications. Implement singly and doubly linked lists. Represent a polynomial as a linked list and write functions for polynomial addition. Implement stack and use it to convert infix to postfix expression 4. Implement a double-ended queue (dequeue) where insertion and deletion operations are possible at both the ends. Implement an expression tree.
CS 2208 DATA STRUCTURES lab manual ( DS lab manual) for CSE - III semester . Download link: 'data structure lab manual'. List of experiments: 1.
Produce its pre-order, in-order, and postorder traversals. Implement binary search tree. Implement insertion in AVL trees. Implement priority queue using binary heaps 9. Implement hashing with open addressing. Implement Prim's algorithm using priority queues to find MST of an undirected graph.
Ex.No:1 Singly Linked List Aim: Write a C program to implement singly linked list operation. Algorithm: Step1: Initiate the list Step2: Declare the functions additem, list items, delnode, insert. Step3: Get the option from the user for list process. Step4: In addtem process give the number of nodes and nodes value. Step5: In listitems process display the items untill the current node point’s null value. Step6: In delnode process check the list status, if not null get the value of deleted node and delete the appropriate node in the list.
And then you can calibrate for the one you just harvested, correct? Afs yield monitor operator manual pdf. I haven't run the new 600 ( but will be this fall ) but that was the way the old monitor worked, wasn't it? Posted 8/8/2007 10:44 (#184424 - in reply to #184390) Subject: Re: AFS 600 Pro Moniter All you have to do is change loads, correct? What specifically is easier in the Insight?
Step7: In insert process give the value of the new node and give the new node position in the existing list. Step8: After the entire process give the option to exit from the program. Ex.No:2 Date: Doubly Linked List Aim: Write a C program to implement doubly linked list operation. Algorithm: Step 1: Initialize pointers start & last as NULL. Step 2: create a doubly linked list by inserting each node at front. Step 3: Print the Menu. Step 4: If the choice is 1, then enter the element to be inserted to the left of the already existing node in a doubly linked list.
Step 5: If the choice is 2, then delete all the occurrences of the element to be deleted in the doubly linked list. Step 6: If the choice is 3, then display all the elements in doubly linked Step 7: If the choice is 4, then exit. Step 8: Repeat steps from 3 to 7 until the choice is 7.
Step 9: Stop. Ex.No:3 Date: Polynomial Addition Aim: Write a C program to Represent a polynomial as a linked list and write functions for polynomial addition Algorithm: Step1: Start the program Step2: Initiate the pointers to each polynomial expressions Step3: Get the value of co – efficient and exponent value of two polynomial expressions Step4: Compare the exponent of two polynomial expressions. Step5: If the exponent values are same add the polynomial co – efficient. Step6: If the exponent values are different add the biggest exponent’s co – efficient value in to the result polynomial.
Step7: Print the result polynomial expression. Step8: Stop the program. Ex.No:4 Date: Infix to Postfix Conversion Aim: Write a C program to Implement stack and use it to convert infix to postfix expression Algorithm: Step1: Start the program. Step2: Initialize the stack. Step3: Read the given infix expression into string called infix. Step4: If the character is an operand, place it on the output.
Step5: If the character is an operator, push it on to the stack. If the stack operator has a higher or equal priority than input operator then pop that operator from the stack and place it onto the output. Step6: If the character is a left parenthesis, push it onto the stack. Step7: If the character is a right parenthesis, pop all operators from the stack till it encounters left parenthesis, discard both the parenthesis in the output.
Step8: Display the postfix expression for the given infix expression. Step9: Stop the program. Ex.No:5 Double Ended Queue Date: Aim: Write a C program to Implement a double-ended queue (dequeue) where insertion and deletion operations are possible at both the ends. Algorithm: Step1: Start the program. Step2: Initialize the queue.
Step3: Declare the following function Rinsert, RDelete, LInsert and LDelete to insert and delete an element into and from the queue. Step4: Declare the function Display to show the elements of queue. Step5: Procedure Linsert Create new node Insert item into the newnode temp Next pointer of newnode points to start node Now newnode temp is start node Step6: Procedure Ldelete Check for Underflow condition Consider temp as start node Move the start pointer and assign the info of temp to item Delete front node. Also return the item to be deleted Step7: Procedure Rinsert.
Create a newnode and insert data into it Consider temp as start node. Link newnode by checking whether the list contains nodes or not Step7: After the entire process give the option to exit from the program. Step8: Stop the program. Ex.No:6 Expression Tree Date: Aim: Write a C program to implement an expression tree.
Produce its pre-order, in-order, and post order traversals.