SquareShift interview question

Just simple problem solving questions