Blume Global interview question

Basic algorithm questions