C++ solution using Sorting ( Comparator ) | Easy to Understand 👍
Approach\n- First, sort the vector as the numeric values stored as strings. You will have to use comaparator for that.\n- After that, just return the (size of t
# Approach\n- First, sort the vector as the numeric values stored as strings. You will have to use comaparator for that.\n- After that, just return the (size of the vector - k)$$th$$ element of the sorted vector.\n\n# Complexity\n- Time complexity: $$O(n logn)$$\n\n- Space complexity: $$O(1)$$\n\n# Code\n```\nclass Solution {\npublic:\n    static bool cmp(string &a, string &b) {\n        if(a.size() == b.size()) {\n            return a < b;\n        }\n        return a.size() < b.size();\n    }\n    string kthLargestNumber(vector<string>& nums, int k) {\n        sort(nums.begin(), nums.end(), cmp);\n        int n = nums.size();\n        return nums[n - k];\n    }\n};\n```
['Array', 'String', 'Sorting', 'C++']