Accenture Interview Question

some algorithms