Verloop Interview Question

programming from string bit tough.