Solve Three Algorithmic Tasks | Snapchat Coding Question