Dsu QP
Dsu QP
Dsu QP
(d) Show the memory representation of stack using array with the help of a diagram.
(e) Define given two types of graph and give example. (i) Direct graph (ii) Undirected graph
(f) Differentiate between linear and non-linear data structures on any two parameters.
(g) Convert the following infix expression to its prefix form using stack A + B – C * D / E + F
(a) Write C program for performing following operations on array : insertion, display.
(b) Evaluate the postfix expression : 5, 6, 2, +, *, 12, 4, /, – Show diagrammatically each step of evolution using stack.
(d) Define the term recursion. Write a program in C to display factorial of a entered number using recursion.
(b) Draw the tree structure of the following expressions: (i) (2a + 5b)3 * (x – 7y)4 (ii) (a – 3b) * (2x – y)3
(c) Write an algorithm to insert an element at the beginning and at end of linked list.
(d) Evaluate the following prefix expression : – * + 4 3 2 5 show diagrammatically each step of evaluation using stack.
(e) Write an algorithm to delete a node from the beginning of a linked list.
(a) Sort the following numbers in ascending order using quick sort. Given numbers 50, 2, 6, 22, 3, 39, 49, 25, 18, 5.
(c) Write an algorithm for performing push and pop operations on stack.
(a) Sort the following numbers in ascending order using Bubble sort. Given numbers : 29, 35, 3, 8, 11, 15, 56, 12, 1, 4, 85,
(b) Describe the concept of linked list with the terminologies: node, next pointer, null pointer and empty list.
(c) Describe working of selection sort method. Also sort given input list in ascending order using selection sort input list –
55, 25, 5, 15, 35.