eBay interview question

Sum problem, matrix problems and graph problems