MCQ Practice

What is the space complexity of the above dynamic programming implementation of the assembly line scheduling problem?

A

O(1)

B

O(n)

C

O(n 2 )

D

O(n 3 )

Correct Answer: B