Professional Documents
Culture Documents
Problem Solving Methods 17CS1103 PDF
Problem Solving Methods 17CS1103 PDF
Problem Solving Methods 17CS1103 PDF
No:
Page 4 of 4 Page 1 of 4
17CS1103 VR17 17CS1103
PART-B UNIT-III
4 x 15 = 60M
6. a. Write briefly about Arrays. 7M
UNIT-I
b. Develop an algorithm to find the maximum element from an array.
2. a. Explain the different problem-solving strategies of an 8M
algorithm. Write an algorithm for addition of two numbers. 8M
(or)
b. Discuss various ways for termination of loops with an
example. 7M 7. a. Design an algorithm to search an element from an array using
Linear Search. 7M
(or)
b. Develop an algorithm to sort the list of elements into
3. a. How to analyze algorithm? Write the different characteristics of non-descending order using Selection Sort. 8M
top-down approach. 8M
UNIT-IV
b. What is time and space complexity? Explain worst and average
case behavior of an algorithm. 7M 8. a. Write the MATLAB statements to calculate the sum of the series:
UNIT-II x 2 x 4 x 6 x8
s 1 7M
2! 4! 6! 8!
4. a. Develop an algorithm for the given two variables a and b,
exchange their values with using a third temporary variable. 8M 6 7 1
b. Let A , x and y 3 4 8M
8 9 2
b. Design an algorithm to compute the average of n numbers. 7M
i) Append the vector x as new column of A and store in matrix B.
(or)
ii) Append the vector y as new row of A and store in matrix C.
5. a. Write the steps involved in solving greatest common divisor
problem. 8M (or)
b. Design an algorithm to print prime numbers in the first n 9. a. The variables i, j, k and l have values equal to 2, 3, 4 and 5
positive integers. 7M respectively. Evaluate the following MATLAB expressions: 8M
i) i*j + k*l
Page 2 of 4 Page 3 of 4