Data structures
Q1) Convert the following Infix expression to prefix
((A + B) - C) * D $ (E + F)
Q2) Evaluate the following postfix form
AB – C * DEF + $ /
A=5, B=3, C=2, D=4, E=1, F=2
Q3) Convert the following Infix expression to postfix
A + B * C (D / E) – F
Q4) Evaluate the following postfix form
+ - AB - * C + D E
A=14, B=3, C=2, D=5, E=6, F=7
Q5) Create a copy of Single linked list of characters
Q6) Converting linear queue to circular queue.
Q7) Concatenating two single linear linked lists
Q8) Find the sum of data in nodes of circular queue stored as integers
Q9) Print the data in double linked list in reverse order
Q10) Functions for finding total number of nodes having even values of double linked list
Q11) Functions for finding total number of nodes having odd values of double linked list
Q12) Functions for inserting node at any location in a single linked list
Q13) Function for reversing linear list
Q14) Function for delete a node at any position
Q15) Function for finding maximum and minimum value
Q16) Function for finding if double linked list of characters is a palindrome
Q17) Function for finding total number of nodes having even values
Q18) Function to add a node in binary search tree of integers
Q19) calculate the depth of a binary tree if total number of nodes in binary tree are 255
Q20) Function for preorder traversal of binary search tree
Q21) construct Huffman tree from INDEPENDENCE
Q22) construct AVL tree for
Mon, tue, thur, sat, sun, wed, fri
Q23) Function for nonrecursive inorder traversal of binary search tree
Q24) Function to count number of leaf nodes in a binary search tree
Q25) Function to perform a left rotation in a binary search tree
Q26) Function to compute the sum of non leaf node values
Q27) Function for push and pop operation on a stack using array
Q28) Function to search an element from integer array using binary search
Q29) Function to perform right rotation of a binary search tree
Q30)Sort 4, 8, 11, 6, 2, 1, 15 ,26, 3 using insertion sort
Q31) sort in descending order using heap sort
15, 16, 18, 13, 12, 20
Q32) Answer the following questions
A
B C
E F D
Write adjacency list
Q33) Write adjacency matrix
Q34) write outdegree for each vertex
Q35) write BFS for start vertex as A
Q36) Write DFS for start vertex as A
Q37) int n[20][40]
Compute the row major and column major address of the member n[12][20]. The base
address is 3000
Java
Q1) Write an awt application which will have 3 scrollbars and a text field. Change background
colour of the text field when scrollbars are scrolled
Q2) write a threaded application which will change caption of the button after every second.
Initially caption of the button is “I”
Q3) write an application which will accept a filename using command line. Show the number of
lines present in that file.
Q4) write an application which will accept a number using command line If the given number is
not a prime, throw “not a prime number exception”
Q5) write an application which will create following threads: thread A printing cumulative sum
of natural numbers & thread B printing alternative characters a,c,e,…
Q6) write an application which will accept age using command line. If age >60 throw senior
citizen exception
Q7) write an application which will accept a filename using command line encrypt the contents
and display it
Q8) write a book class with attributes bookno, title, author, book availability status. Write 3
constructors and a method to check the availability of given book
Q9) write applet which will display 3 scrollbars & when scrollbar value is changed, set
background colour accordingly
Q10) write a prog that will copy one file to another
Q11) write a prog that will concatenate two files to another
Q12) write a prog showing marquee effect
Q13) write a prog for packages
Q14) write a prog for displaying the pattern
2 3
4 5 6
Q15) write a prog for inheritance
Q16) write a program using menu
Q17) write a prog for anonymous classes
Q18) write short notes on Layout manager
Q19) write a prog to reverse the contents of a file
Q20) accept data from the user and save it to a file