"simple enough "run time error
hi @2020uec2022 coz nos are large
It is easy to see that the total number of elements in the final list will be 2logn + 1. The problem can be solved by locating each element in the list and checking whether it is ‘1’ .The ith element can be located in O(logn) by using Divide and Conquer strategy. Answer is the total number of all such elements which equal ‘1’.
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.