Pocket Gems interview question

Basic algorithm and basic knowledge in CS. Also some management stuff problem.