0 0 votes Consider the following pseudo-code for reversing an array $A$.Algorithm ReverseArray(A[l..r])// Input: an array A[l..r]// Output: the array A in reverse orderif ..... then Swap A[l] and A[r] REVERSEARRAY (A[l+1..r-1])For what condition in the if clause, the above pseudo-code will correctly reverse the array $A$ ?$r \geq 0$$\ell \neq r$$l \leq r$$l < r$ Others isi2026-mcs-pca + – Shubham Sharma 2 87 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes D. $l < r$ mudit23june answered Jun 7 mudit23june comment Share Follow See 1 comment 1 1 comment reply Abhiroop_Sarkar commented Jun 17 reply Follow flag Both $l \le r$ and $l \lt r$ are valid answers. So this was MTA! 0 0 replyShare Please log in or register to add a comment.