MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structure knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
For which of the following inputs would Kadane s algorithm produce a WRONG output? |
| A. | {1,0,-1} |
| B. | {-1,-2,-3} |
| C. | {1,2,3} |
| D. | {0,0,0} |
| Answer» C. {1,2,3} | |
| 2. |
For which of the following inputs would Kadane s algorithm produce the INCORRECT output? |
| A. | {0,1,2,3} |
| B. | {-1,0,1} |
| C. | {-1,-2,-3,0} |
| D. | {-4,-3,-2,-1} |
| Answer» E. | |
| 3. |
Kadane s algorithm uses which of the following techniques? |
| A. | Divide and conquer |
| B. | Dynamic programming |
| C. | Recursion |
| D. | Greedy algorithm |
| Answer» C. Recursion | |
| 4. |
Kadane s algorithm is used to find ____________ |
| A. | Longest increasing subsequence |
| B. | Longest palindrome subsequence |
| C. | Maximum sub-array sum |
| D. | Longest decreasing subsequence |
| Answer» D. Longest decreasing subsequence | |