Verisign Interview Question

programming logic