Payoneer interview question

The answer was related to Graph data structure