Computer Engineering (Semester 3)
Total marks: 80
Total time: 3 Hours
INSTRUCTIONS
(1) Question 1 is compulsory.
(2) Attempt any three from the remaining questions.
(3) Draw neat diagrams wherever necessary.
1.a. Define and explain the following terms : [3]
(i) Data
(ii) Data structure
(iii) Algorithm.
(3 marks)
00
1.b. Give pseudo C/C++ code to reverse the string.
(3 marks)
00
1.c. Explain the divide and conquer strategy with suitable example.
Comment on its time complexity.
(6 marks)
00
Or
2.b. Define and explain the following terms :
(i) Sequential organization
(ii) Linear data structure
(iii) Ordered list
(iv) Sparse matrix.
(4 marks)
00
2.b. Explain polynomial representation using an array with suitable
example.
(2 marks)
00
2.c. Explain the Asymptotic notation Big O, Omega and Theta with
suitable example.
(6 marks)
00
3.a. Write a pseudo C/C++ code to insert node into a singly
linked list.
(3 marks)
00
3.b. Explain Generalised linked list with suitable example.
(3 marks)
00
3.c. Explain evaluation of postfix expression using stack with
suitable example.
(3 marks)
00
Or
4.a. Give pseudo C/C++ code to implement the following operations
on linked stack :
(i) Create
(ii) Push data
(4 marks)
00
4.b. Explain the stepwise conversion using stack for the given infix
expression to the postfix expression :
A * B + C * D.
(2 marks)
00
4.c. Write pseudo C/C++ code for polynomial addition using singly
linked list.
(6 marks)
00
5.a. Define the following terms with example :
(i) Linear queue
(ii) Circular queue
(iii) Priority queue.
(6 marks)
00
5.b. Write pseudo C/C++ code to implement priority queue
operations.
(7 marks)
00
Or
6.a. Explain linear queue and circular queue with suitable
example. Give the advantages of circular queue over linear queue.
(6 marks)
00
6.b. Write pseudo C/C++ code to implement linked queue.
(7 marks)
00
7.a. Sort the following numbers using insertion sort :
55, 85, 45, 11, 34, 05, 89, 99, 67.
Discuss its time complexity and space complexity.
(6 marks)
00
7.b. Explain sequential search and binary search with appropriate
example. Comment on their data organization, time complexity
and space complexity.
(7 marks)
00
Or
8.a. Explain Merge sort using the following example :
18, 13, 12, 22, 15, 24, 10, 16, 19, 14, 30.
Discuss its time and space complexity.
(6 marks)
00
8.b. Write a pseudo C/C++ code to sort the data using bucket
sort in ascending order.
(7 marks)
00