What is the space complexity of Kadane's algorithm?
O(1)
O(n)
O(n^{2})
None of the mentioned
6 practice sets · Page 1 of 1
What is the space complexity of Kadane's algorithm?
O(1)
O(n)
O(n^{2})
None of the mentioned
What is the time complexity of Kadane's algorithm?
O(1)
O(n)
O(n^{2})
O(5)
For which of the following inputs would Kadane's algorithm produce a WRONG output?
{1,0,-1}
{-1,-2,-3}
{1,2,3}
{0,0,0}
For which of the following inputs would Kadane's algorithm produce the INCORRECT output?
{0,1,2,3}
{-1,0,1}
{-1,-2,-3,0}
{-4,-3,-2,-1}
Kadane's algorithm uses which of the following techniques?
Divide and conquer
Dynamic programming
Recursion
Greedy algorithm
Kadane's algorithm is used to find ____________
Longest increasing subsequence
Longest palindrome subsequence
Maximum sub-array sum
Longest decreasing subsequence