eBay Interview Question

I was given the standard codesignal questions