IndiaMART interview question

Two sum and four sum problem