Hopper interview question

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