IXL Learning interview question

Just one algorithms question