Foomotion interview question

Data structures and algorithms and oop