Programming question 6 finished. Two sum algorithm and sum of medians implemented.