LTM Limited Interview Question

Write the optimal code for prime number in C++