Add medianBy3() method for better performance. Task 2.3.18.