Siemens Energy Interview Question

Linear search and prime number