I did not got the part of editorial where solution is optimized from O(n^2) to O(n^(1/2)) . I want to understand that part only .
Please do not downvote this post :If some one helps me then this post might help some one else.Why you want to downvote ? Will this post harm some one ? No .Is it rude or offensive ? No . Do i want to increase my contribution ? No (You can choose not to upvote and just help me and it will be great help for me) . Please understand that everyone is once a beginner .
"Do I want to increase my contribution? No." So why do u care so much?