Bitobic subarrays example

Hello @Vikaspal,

  1. The only issue with the segment of code that you have shared is:
    For i=n-1, i+1=n and n is not valid
    Solution:
    iterate from i=0 to n-2.

  2. It should be 1 2.
    As the sequence mentioned in the question is:
    A[i] <= A[i + 1] … <= A[k] >= A[k + 1] >= … A[j – 1] > = A[j]

  3. You can declare it anyways. It won’t make any computational difference in the program.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

1 Like

@Vikaspal I see you have re-opened your doubt, can you please share your query? I would be happy to help.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.