C++ O(nlogn) time and O(n) space solution using Binary Search
Please do upvote\n\n\nclass Solution {\nprivate:\n    bool binSrch(vector<int> &arr, int find) {\n        int l = 0, r = arr.size() - 1;\n        while (l <= r)
Please do **upvote**\n\n```\nclass Solution {\nprivate:\n    bool binSrch(vector<int> &arr, int find) {\n        int l = 0, r = arr.size() - 1;\n        while (l <= r) {\n            int mid = l + (r - l)/2;\n            if (find == arr[mid]) return true;\n            if (find < arr[mid]) r = mid - 1;\n            if (find > arr[mid]) l = mid + 1;\n        }\n        return false;\n    }\npublic:\n    vector<int> findLonely(vector<int> &nums) {\n        vector<int> res;\n        unordered_map<int, int> mp;\n        for (int num : nums) mp[num]++;\n        sort(nums.begin(), nums.end());\n        for (int num : nums) {\n            if (mp[num] == 1 && !binSrch(nums, num+1) && !binSrch(nums, num-1)) {\n                res.push_back(num);\n            }\n        }\n        return res;\n    }\n};\n```
['Binary Search', 'C', 'Binary Tree', 'C++']