Citadel Interview Question

ants on a string