Programming Question - 6: 2Sum and Median algorithms - Implementing 'Median maintenance' algorithm