Anna University: Chennai - 600 025 B.E/B.Tech Degree Examinations, April/May 2014
Anna University: Chennai - 600 025 B.E/B.Tech Degree Examinations, April/May 2014
Regulations - 2013
Time: 3 Hours
1.Write a function program to perform the following operations on a singly linked list
Create a list
Insert an element to the list
Delete the maximum element from the list
Arrange the list as sorted order
Display the elements of the list
Write a main method to demonstrate the above functionalities.
Write a function program to perform the following operations on a singly linked list
Create a list
Find the smallest element from the list
Insert an element if it is not a duplicate element
Display the elements in reverse order
Find the number of odd values and even values
Write a main method to demonstrate the above functionalities.
3. Let X and Y are two singly linked lists which stores a character of a string. Write a function
to perform the following operations
Create a list
Finds the number of characters in each string
Find the first character in the string X which does not occur in string Y
Concatenate the two string
Display the two string
Write a main method to demonstrate the above functions.
Write a function to read an expression and which is stored in X=A+B*C+(D*E+F)*G as infix format.
Write an algorithm to transform an infix expression X into its postfix equivalent and also write a
function to evaluate the postfix expression. Write a main method to demonstrate the above functions.
Assume that the infix expression X is terminated by a character #.
Write a function to read an expression and which is stored in X=(A+B)*D+E/(F+A*D)+C as infix format.
Write an algorithm to transform an infix expression X into its postfix equivalent and also write a function
to evaluate the postfix expression. Write a main method to demonstrate the above functions. Assume that
the infix expression X is terminated by a character $.
Convert the given infix expression (5*4)+6/2-3+1 into postfix expression by implementing the Above
using stack.
Write a C program to implement a stack ADT using Linked List and write the routine to create a empty
stack and perform the operation of push(X,S) by inserting an element at the front of the list, POP(S)
operation is performed by deleting the element at the front of the list and display the elements from
Linked list. Test your program with at least 6 elements and provide the output.
Write a C program to implement a Queue ADT using Linked List to create a Queue, write the routine for
enqueue operation which represents a function enqueue(X) performed at the end of the list, dequeue
operation which represents a function dequeue(Q) performed at the front of the list. Test your program
with at least 5 elements and provide the output
Write a function program to perform the following operations on a doubly linked list
Create a list
Insert an element to the list
Delete a specific element from the list
Display the content of the list
Find the number of elements in the list
Write a main method to demonstrate the above functionalities.
Write a C program to sort the values 5, 8, 3, 1, 9 using merge sort.
Write a C program to sort the values 5, 8, 3, 1, 9 using quick sort.
Write a C program to implement linear search.
Write a C program to implement Binary search.
Write a C program to find sum of digit, reversal of digit and largest of digit.