Microsoft interview question

Given an array, find median element