30. Median of an Array
Lesson 31 of 31 in Coddy's 30 Days of Logic Building in C++ course.
Challenge
EasyDescription: Write a function to find the median of a sorted array.
Input: [1, 2, 3, 4, 5]
Output: 3
Try it yourself
#include <vector>
using namespace std;
int findMedian(vector<int> arr) {
// Write code here
}All lessons in 30 Days of Logic Building in C++
1Introduction
Introduction