can anyone resolve better than O(N*N)↵
↵
/predownloaded/9b/e2/9be282ab5ad24ffbfa25b13501f2155c26b50b48.png↵
↵
/predownloaded/3b/ec/3bec38e86fa9432dfa375da46514039cc392d42f.png
↵
/predownloaded/9b/e2/9be282ab5ad24ffbfa25b13501f2155c26b50b48.png↵
↵
/predownloaded/3b/ec/3bec38e86fa9432dfa375da46514039cc392d42f.png