WD Interview Question

How did you implement the question