Arista Networks Interview Question

Two sum variation in python