Quantiphi Interview Question

Coding q : finding a prime no