eBay interview question

codesignal practice problems ranging from easy to hard