Motive interview question

Some dumb algorithmic problems. Easier than expected