Lucid Software interview question

Two easy leetcode problem and one object design