Domanda di colloquio di NonStop io Technologies

Basic RoR questions, coding problem from Leetcode.