Amazon interview question

Two sum problem but had different edge cases