Magic Leap Interview Question

simple C++ coding question