Data Structures and Algorithms Design Week 1 Answers

Are you looking for Data Structures and Algorithms Design Week 1 Answers ? All weeks solutions of this Swayam course are available here.


Data Structures and Algorithms Design Week 1 Answers

Data Structures and Algorithms Design Week 1 Answers (July-Dec 2025)

Course link: Click here to visit course on Nptel Website


Question 1. You are given a sorted array from 1 to n, but one number is missing. What is a good way to find the missing number?
a) Use the expected sum and subtract actual sum
b) Sort the array again and scan
c) Guess the missing number
d) Randomly sample elements

View Answer


Question 2. In Merge Sort (ascending order), what is the order of elements after the second pass of merging for the array [20,28,11,2,3,1,27,25,8,17]?
a) 2, 11, 20, 28, 1, 3, 25, 27, 8, 17
b) 2, 3, 11, 20, 28, 1, 8, 17, 25, 27
c) 11, 20, 28, 1, 2, 3, 8, 25, 27, 17
d) 1, 2, 3, 11, 20, 28, 8, 17, 25, 27

View Answer

These are Data Structures and Algorithms Design Week 1 Answers


Question 3. Which algorithm of the following options uses the least number of comparisons (among the elements of the array) to sort the array A in ascending order? Where, A = [1,7,12,19,17,21,23]
a) Selection sort
b) Merge sort
c) Insertion sort
d) Quick sort

View Answer


Question 4. Which of the following functions defines the Fibonacci sequence correctly?
a) F(n) = F(n) + F(n+1)
b) F(n) = F(n+1) + F(n+2)
c) F(n) = F(n-1) + F(n-2)
d) F(n) = F(n-1) – F(n-2)

View Answer

These are Data Structures and Algorithms Design Week 1 Anwers


Question 5. A sorting algorithm is called stable if it preserves the relative order of equal elements. Which of the following is a stable sorting algorithm?
a) Insertion Sort
b) Quick Sort
c) Heap Sort
d) Selection Sort

View Answer

These are Data Structures and Algorithms Design Week 1 Answers


Question 6. Which of the following is the most appropriate use of an array?
a) Storing a fixed collection of elements where fast access is needed
b) Implementing hierarchical relationships
c) Representing nodes with multiple children
d) Storing elements with frequent insertions and deletions

View Answer


Question 7. Why does repeated squaring help in computing the nth Fibonacci number faster?
a) Because matrix powers can be computed in logarithmic steps using exponentiation by squaring
b) Fibonacci numbers follow a geometric sequence
c) We can precompute all Fibonacci numbers and store them in an array
d) Recursion eliminates redundant calculations automatically

View Answer

These are Data Structures and Algorithms Design Week 1 Anwers


Question 8. Suppose you are given a list of n integers and a target sum. In the brute-force approach to the Subset Sum problem, how many possible subsets need to be checked in the worst case?
a) 2ⁿ
b) n²
c) n⋅logn
d) n!

View Answer


Question 9. Which of the following is not a disadvantage of using arrays as a data structure?
a) Arrays support constant-time access to any element using its index
b) Arrays have fixed size and cannot be resized without reconstruction
c) Inserting or deleting elements requires shifting multiple elements
d) Arrays cannot model data with varying-length records efficiently

View Answer


Question 10. Binary Search is an example of which algorithmic design paradigm?
a) Divide and Conquer
b) Greedy
c) Dynamic Programming
d) Backtracking

View Answer


These are Data Structures and Algorithms Design Week 1 Answers

Click here for all nptel assignment answers