Amazon Interview Question

window sum, find k nearest point