NVIDIA interview question

Implement algorithimc problem i C++