An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array \(A[0:n-1]\) is given below.Let \(L_i\) denote the length of the longest monotonically increasing sequence starting at index \(i\) in the array.Initialize \(L_{n-1}=1\).For all \(i\) such that \(0\le i\le n-2\):\[L_i=\begin{cases}1+\max\{L_j : i<j<n \text{ and } A[i]<A[j]\} & \text{if such a } j \text{ exists}\\ 1 & \text{otherwise}\end{cases}\]Finally, the length of the longest monotonically increasing sequence is \(\max(L_0, L_1, \ldots, L_{n-1})\).Which of the following statements is TRUE?
- AThe algorithm uses dynamic programming paradigm
- BThe algorithm has a linear complexity and uses branch and bound paradigm
- CThe algorithm has a non-linear polynomial complexity and uses branch and bound paradigm
- DThe algorithm uses divide and conquer paradigm.