Find the Median

  • + 0 comments

    Here is my c++ solution, you can watch the explanation here https://youtu.be/CbEYUUopR-8

    int findMedian(vector<int> arr) {
        sort(arr.begin(), arr.end());
        return arr[arr.size() / 2];
    }