momox interview question

Codality challange: 2 data structure problems and 1 Django problem