Hello…
I am doing this question from hackerearth…
In this question … first i have generated all the binary digit for number of x…
Now after this… I have placed each representation on place of x and calculated the maximum size of subarray having same number of 1’s and 0’s.
This is my submission…
https://www.hackerearth.com/submission/52035587/
Please look at this…