Python Assignment 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

NATIONAL INSTITUTE OF FASHION TECHNOLOGY

(End Term Evaluation Assignment 2, Jan-June 2023)

Subject: - Algorithm Design & Data Structure

Max. Marks: 30
Duration:40 mins

1. Compare and contrast the concepts of recursion and iteration, and provide an example of
where each method is useful. (5 marks)
2. Differentiate between a stack and a queue, and provide an example of a scenario where each
data structure is applicable. (3 marks)
3. Discuss the different algorithm design techniques, including divide and conquer and dynamic
programming, and provide an example of a situation where each is applicable. (4 Marks)
4. Explain the difference between an array and a linked list. (3 marks)
5. Describe a real-world problem that can be solved using graph traversal algorithms. (3 Marks)
6. Explain Algorithm analysis techniques. (5 Marks)

(7*1=7)
7. What is the term for the process of determining the order of elements in a list or array?
8. Which data structure uses two pointers, one for the head and one for the tail?
9. What is the term for a data structure that contains a sequence of elements where each
element points to the next one?
10. Which algorithm design technique involves repeatedly breaking a problem down into smaller
sub-problems until the solution becomes simple enough to be solved directly?
11. Which of the following is NOT an example of an abstract data type?
a. List b. Stack c. Integer d. Queue
12. Which of the following data structures uses a Last In First Out (LIFO) policy?
a. Stack b. Queue c. Linked List d. Binary Tree
13. Which algorithm design technique is best suited for solving problems that can be divided into
smaller sub-problems?
a. Dynamic Programming b. Greedy Method c. Backtracking d. Hill Climbing

You might also like