Hopper Interview Question

Q: How did you resolve the hackerRanck problem and why?