Couchbase interview question

2 sum question for DSA