Pregunta de entrevista de IndiaMART

Two sum and four sum problem