• Asked to answer
    + 6 comments

    I think the data requested by the problem is pretty straight forward and I can think no better (in the way of optimization) way to solve it. I solved it using pretty much same as your solution.