Do i have to use the O(n^6) approach to generate all the subarrays or is there some other much more efficient approach to solve this question.
Which approach to use in this question
Hello @kartiksaxena2000 using that approach you wouldn’t be able to pass all the test cases.
You need to think of some optimised approach.
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.