sir can u please help me to correct my code only 1 test case is passing i have explained my code with comments
Maximum Xor permutation
Share your code after giving proper indentation. Its not readable.
Just brute force the solution since 2^10 can be upto only 1024. So for particular number of one’s in a string , precompute the numbers formed with that number of one’s and then just find max xor among any three number with that particular number of one’s.
For better understanding , please do refer this -:
Comments are added.
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.