C++ O(N^2 * LogN) Binary Search Solution
\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int N, vector<vector<int>>& mines) {\n        int len = 0;\n        vector<set<int>> row(N), col(N);
```\nclass Solution {\npublic:\n    int orderOfLargestPlusSign(int N, vector<vector<int>>& mines) {\n        int len = 0;\n        vector<set<int>> row(N), col(N);\n        for (auto &v : mines) {\n            row[v[0]].emplace(v[1]);\n            col[v[1]].emplace(v[0]);\n        }\n\n        for (int r = 0; r < N; r++) {\n            for (int c = 0; c < N; c++) {\n                int row_len = maxlen(row[r], c, N); // max length of row\n                int col_len = maxlen(col[c], r, N); // max length of col\n                len = max(len, min(row_len, col_len));\n            }\n        }\n        return (len + 1) / 2;\n    }\n\n    int maxlen(set<int>& s, int mid, int N) {\n        auto it = s.lower_bound(mid);\n        if (it != s.end() && *it == mid) return 0; // (i, j) is 0\n        int end = it == s.end() ? N - 1 : *it - 1;\n        int begin = it == s.begin() ? 0 : *(--it) + 1;\n        int len = 2 * min(mid - begin, end - mid) + 1;\n        return len;\n    }\n};\n```
[]